influxdata/influxdb · error · ExecutePluginError

the process_writes function is not present in the plugin…

Error message

the process_writes function is not present in the plugin. Should be defined as: process_writes(influxdb3_local, table_batches, args=None)

What it means

The Python plugin host looks up a function named process_writes on the loaded plugin module when executing a write trigger. This ExecutePluginError is raised when the module exists but does not define process_writes. Each trigger kind expects a specific entry-point function; a write trigger requires process_writes(influxdb3_local, table_batches, args=None).

Solutions

  1. Add the required entry point to the plugin module: def process_writes(influxdb3_local, table_batches, args=None): ...
  2. Check spelling and ensure it is a module-level function, not nested in a class or another function.
  3. If this file is meant for HTTP triggers, create it with the correct entry point (process_request) or use separate files per trigger type.
  4. Redeploy/reload the plugin after adding the function.

Example fix

# before
def process_request(influxdb3_local, query_parameters, request_headers, request_body, args=None):
    ...
# after
def process_writes(influxdb3_local, table_batches, args=None):
    for batch in table_batches:
        ...

def process_request(influxdb3_local, query_parameters, request_headers, request_body, args=None):
    ...
Defensive patterns

Strategy: validation

Validate before calling

import inspect
def has_process_writes(module) -> bool:
    fn = getattr(module, "process_writes", None)
    return callable(fn) and len(inspect.signature(fn).parameters) >= 2

Type guard

def has_process_writes(mod) -> bool:
    return callable(getattr(mod, "process_writes", None))

Try / catch

try:
    run_plugin(path)
except ExecutePluginError as e:
    if "process_writes" in str(e):
        log.error(f"plugin {path} missing process_writes entry point")

Prevention

When it happens

Trigger: Registering/invoking a plugin file as a WAL write trigger when the Python module lacks a top-level process_writes function — e.g. the file only defines process_request or process_scheduled_call, or the function is misspelled/nested inside a class.

Common situations: Reusing one plugin file across different trigger types; typos like process_write or processWrites; function defined with wrong name or indented inside another scope; refactoring renamed the entry point.

Understand the failure class

Background: "missing required argument" and "the following required arguments were not provided": what required-argument errors mean and how to fix them — this error's family across 20 libraries.

Related errors


AI-assisted analysis of influxdata/influxdb@06200ef96b (2026-09-19). Data as JSON: /api/errors/8ae8edb40d4734ed. Report an issue: GitHub.

Appendix: source

Thrown at influxdb3_py_api/src/error.rs:5

use thiserror::Error;

#[derive(Debug, Error)]
pub enum ExecutePluginError {
    #[error(
        "the process_writes function is not present in the plugin. Should be defined as: process_writes(influxdb3_local, table_batches, args=None)"
    )]
    MissingProcessWritesFunction,

    #[error(
        "the process_request function is not present in the plugin. Should be defined as: process_request(influxdb3_local, query_parameters, request_headers, request_body, args=None) -> Tuple[str, Optional[Dict[str, str]]]"
    )]
    MissingProcessRequestFunction,

    #[error(
        "the process_scheduled_call function is not present in the plugin. Should be defined as: process_scheduled_call(influxdb3_local, call_time, args=None)"
    )]
    MissingProcessScheduledCallFunction,

    #[error("{0}")]
    PluginError(#[from] anyhow::Error),
}

View on GitHub (pinned to 06200ef96b)