Mady
Mady9mo ago

Wasm bug

I'm trying to transform a dataframe in a WASM notebook. I'm getting this error. Any ideas? Is this something in my dataframe/code or is this a bug in the WASM notebook?
Traceback (most recent call last): File "/lib/python3.11/site-packages/marimo/_pyodide/pyodide_session.py", line 199, in put_control_request parsed = parse_raw({"body": json.loads(request)}, Container).body ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/lib/python3.11/site-packages/marimo/_utils/parse_dataclass.py", line 119, in parse_raw return build_dataclass(message, cls) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/lib/python3.11/site-packages/marimo/_utils/parse_dataclass.py", line 91, in build_dataclass transformed = { ^ File "/lib/python3.11/site-packages/marimo/_utils/parse_dataclass.py", line 92, in <dictcomp> to_snake(k): _build_value(v, types[to_snake(k)]) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/lib/python3.11/site-packages/marimo/_utils/parse_dataclass.py", line 64, in _build_value raise ValueError(f"Value '{value}' does not fit any type of the union") ValueError: Value '{'function_call': {'functionCallId': '0dbd8bf9-f5b1-4d1a-965a-1163e10f6103', 'args': {}, 'functionName': 'get_dataframe', 'namespace': 'SPZA-0'}}' does not fit any type of the union
Traceback (most recent call last): File "/lib/python3.11/site-packages/marimo/_pyodide/pyodide_session.py", line 199, in put_control_request parsed = parse_raw({"body": json.loads(request)}, Container).body ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/lib/python3.11/site-packages/marimo/_utils/parse_dataclass.py", line 119, in parse_raw return build_dataclass(message, cls) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/lib/python3.11/site-packages/marimo/_utils/parse_dataclass.py", line 91, in build_dataclass transformed = { ^ File "/lib/python3.11/site-packages/marimo/_utils/parse_dataclass.py", line 92, in <dictcomp> to_snake(k): _build_value(v, types[to_snake(k)]) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/lib/python3.11/site-packages/marimo/_utils/parse_dataclass.py", line 64, in _build_value raise ValueError(f"Value '{value}' does not fit any type of the union") ValueError: Value '{'function_call': {'functionCallId': '0dbd8bf9-f5b1-4d1a-965a-1163e10f6103', 'args': {}, 'functionName': 'get_dataframe', 'namespace': 'SPZA-0'}}' does not fit any type of the union
2 Replies
Myles Scolnick
Myles Scolnick9mo ago
That’s a bug. I know the exact fix but won’t get to it until later. It’s only in wasm though if you want to run marimo locally to unlock yourself until it’s fixed
Mady
MadyOP9mo ago
Thanks for the quick response!