pathwaycom/pathway · error · ValueError
Unknown mode: {}. Only {} are supported
Error message
Unknown mode: {}. Only {} are supported What it means
Error "Unknown mode: {}. Only {} are supported" thrown in pathwaycom/pathway.
Source
Thrown at python/pathway/io/_utils.py:177
stacklevel=stacklevel + 1,
)
kwargs.pop(kwarg_name)
deprecated_kwargs_with_custom_report = ["persistent_id"]
unexpected_args_list = []
for kwarg in kwargs.keys():
if kwarg not in deprecated_kwargs_with_custom_report:
unexpected_args_list.append(kwarg)
if unexpected_args_list:
unexpected_arg_names = ", ".join(repr(arg) for arg in unexpected_args_list)
raise TypeError(f"Got unexpected keyword arguments: {unexpected_arg_names}")
def internal_connector_mode(mode: str | api.ConnectorMode) -> api.ConnectorMode:
if isinstance(mode, api.ConnectorMode):
return mode
internal_mode = _INPUT_MODES_MAPPING.get(mode)
if not internal_mode:
raise ValueError(
"Unknown mode: {}. Only {} are supported".format(
mode, ", ".join(_INPUT_MODES_MAPPING.keys())
)
)
return internal_mode
def internal_read_method(format: str) -> ReadMethod:
if format in (
"binary",
"plaintext_by_file",
"plaintext_by_object",
"only_metadata",
):
return ReadMethod.FULL
return ReadMethod.BY_LINE
View on GitHub (pinned to fa2f74a464)
Solutions
- Pass one of the supported modes listed in the error message.
Example fix
pw.io.fs.read(path, mode='streaming')
When it happens
Trigger: Thrown at python/pathway/io/_utils.py:177 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of pathwaycom/pathway@fa2f74a464 (2026-08-15).
Data as JSON: /api/errors/2dd4f05056906023.
Report an issue: GitHub.