{"record":{"id":"03a46387d7655aae","repo":"pathwaycom/pathway","slug":"column-arg-name-r-is-present-on-the-argument-lis","errorCode":null,"errorMessage":"Column {arg_name!r} is present on the argument list of the invoke method but it is not present in the input_table.","messagePattern":"Column (.+?) is present on the argument list of the invoke method but it is not present in the input_table\\.","errorType":"validation","errorClass":"TypeError","httpStatus":null,"severity":"error","filePath":"python/pathway/stdlib/utils/async_transformer.py","lineNumber":467,"sourceCode":"\n        self._input_table = input_table\n\n    def _check_signature_matches_schema(\n        self, sig: inspect.Signature, schema: type[Schema]\n    ) -> None:\n        try:\n            sig.bind(**schema.columns())\n        except TypeError as e:\n            msg = str(e)\n            if match := re.match(\"got an unexpected keyword argument '(.+)'\", msg):\n                column = match[1]\n                raise TypeError(\n                    f\"Input table has a column {column!r} but it is not present\"\n                    + \" on the argument list of the invoke method.\"\n                )\n            elif match := re.match(\"missing a required argument: '(.+)'\", msg):\n                arg_name = match[1]\n                raise TypeError(\n                    f\"Column {arg_name!r} is present on the argument list of the invoke\"\n                    + \" method but it is not present in the input_table.\"\n                )\n            raise e\n\n    def __init_subclass__(cls, /, output_schema: type[pw.Schema], **kwargs):\n        super().__init_subclass__(output_schema, **kwargs)\n\n    def with_options(\n        self,\n        capacity: int | None = None,\n        timeout: float | None = None,\n        retry_strategy: udfs.AsyncRetryStrategy | None = None,\n        cache_strategy: udfs.CacheStrategy | None = None,\n    ) -> AsyncTransformer:\n        \"\"\"\n        Sets async options.\n","sourceCodeStart":449,"sourceCodeEnd":485,"githubUrl":"https://github.com/pathwaycom/pathway/blob/fa2f74a4649b7c5908690cf60137263d8d80de5f/python/pathway/stdlib/utils/async_transformer.py#L449-L485","documentation":"The mirror case of the unexpected-column error: when binding the input table's columns against invoke()'s signature fails with 'missing a required argument', AsyncTransformer raises this TypeError. It means invoke() declares a positional-or-keyword parameter (no default) whose name is not a column of the input table, so the transformer has no value to pass for it.","triggerScenarios":"invoke(self, q: str, context: str) is defined but the input table only has column q; renaming a table column so it no longer matches the parameter name; passing a projected/selected subset of columns that drops one the method needs.","commonSituations":"Renaming columns with rename() or select aliasing after the transformer was written; connector schema change dropping a field; parameter name typo (param `query` vs column `q`).","solutions":["Rename the parameter to exactly match the existing column name, or rename the table column to the parameter name","Add the missing column to the table: input_table.with_columns(context=...) before construction","Give the parameter a default value if it is optional; defaulted parameters do not fail sig.bind"],"exampleFix":"# before\nclass E(pw.AsyncTransformer, output_schema=S):\n    def invoke(self, query: str) -> dict: ...\nout = E(t)  # t has column 'q', not 'query'\n\n# after\nt = t.rename_columns(query='q')\nout = E(t)","handlingStrategy":"validation","validationCode":"import inspect\nparams = set(inspect.signature(YourTransformer.invoke).parameters) - {'self'}\ncols = set(input_table.schema.column_names())\nrequired = {p for p in params if inspect.signature(YourTransformer.invoke).parameters[p].default is inspect.Parameter.empty}\nassert required <= cols, f'invoke() params missing from table: {required - cols}'","typeGuard":"def all_required_params_have_columns(cls: type, table: pw.Table) -> bool:\n    import inspect\n    sig = inspect.signature(cls.invoke)\n    req = {n for n, p in sig.parameters.items() if n != 'self' and p.default is inspect.Parameter.empty}\n    return req <= set(table.schema.column_names())","tryCatchPattern":null,"preventionTips":["Name invoke() parameters exactly after table columns","After any rename_columns/select, re-check the transformer pairing in tests","Prefer defaulted parameters for anything not strictly required"],"tags":["pathway","async","async-transformer","schema-mismatch","argument-validation"],"backgroundTag":null,"analyzedSha":"fa2f74a4649b7c5908690cf60137263d8d80de5f","analyzedAt":"2026-08-15T01:48:17.006Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}