#227·pathway

[Bug]: TypeError: Cannot instantiate typing.Any

Author: nikitosCreated May 1, 2026Updated May 26, 2026
Labelsbug

Steps to reproduce

in pw.io.http.rest_connector if no schema was provided default is: https://github.com/pathwaycom/pathway/blob/6bcee7efd35dc3d6586160df1a0641b0d55fa8ff/python/pathway/io/http/_server.py#L832 but deserialising is imposible to typing.Any here: https://github.com/pathwaycom/pathway/blob/6bcee7efd35dc3d6586160df1a0641b0d55fa8ff/python/pathway/io/http/_server.py#L479

Relevant log output

ERROR:root:Failed to cast column 'query' to type 'typing.Any'
Traceback (most recent call last):
  File "/Users/nikitos/.pyenv/versions/pathway3/lib/python3.10/site-packages/pathway/io/http/_server.py", line 480, in _cast_types_to_schema
    payload[column] = exact_type(payload[column])
  File "/Users/nikitos/.pyenv/versions/3.10.19/lib/python3.10/typing.py", line 387, in __call__
    raise TypeError(f"Cannot instantiate {self!r}")
TypeError: Cannot instantiate typing.Any

What did you expect to happen?

i temporary use this hack, but not sure is it right: payload[column] = payload[column] if exact_type == typing.Any else exact_type(payload[column])

Version

0.30.1

Docker Versions (if used)

No response

OS

MacOS

On which CPU architecture did you run Pathway?

ARM64 (AArch64, Apple silicon)