Steps to reproduce
in pw.io.http.rest_connector if no schema was provided default is:
|
schema = pw.schema_builder({"query": pw.column_definition()}) |
but deserialising is imposible to typing.Any here:
|
exact_type = unoptionalize(dtype).typehint |
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)
Steps to reproduce
in
pw.io.http.rest_connectorif no schema was provided default is:pathway/python/pathway/io/http/_server.py
Line 832 in 6bcee7e
but deserialising is imposible to typing.Any here:
pathway/python/pathway/io/http/_server.py
Line 479 in 6bcee7e
Relevant log output
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)