Closed
Description
Checklist
- I added a descriptive title
- I searched for other issues and couldn't find a solution or duplication
- I already searched in Google and didn't find any good information or help
What happened?
The example code for WebSocket given in the pyscript user documentation works without problems under micropython but gives an error with pyodide.
What browsers are you seeing the problem on? (if applicable)
Chrome
Console info
Traceback (most recent call last):
File "/lib/python312.zip/_pyodide/_base.py", line 596, in eval_code_async
await CodeRunner(
File "/lib/python312.zip/_pyodide/_base.py", line 410, in run_async
coroutine = eval(self.code, globals, locals)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "<exec>", line 17, in <module>
File "/home/pyodide/pyscript/websocket.py", line 50, in __setattr__
self._ws[attr] = value
~~~~~~~~^^^^^^
TypeError: 'pyodide.ffi.JsProxy' object does not support item assignment
Additional Context
Using pyscript 2024.8.2