reflex-examples icon indicating copy to clipboard operation
reflex-examples copied to clipboard

chatroom example: cannot set nick and send message(0.1.33)

Open milochen0418 opened this issue 1 year ago • 2 comments

After setup Nick in Nick's input and then clicking Message'input, We have the following error message

Traceback (most recent call last):
  File "/Users/milochen/anaconda3/envs/pynecone-examples/lib/python3.11/site-packages/pynecone/state.py", line 693, in _process_event
    events = await fn(**payload)
             ^^^^^^^^^^^^^^^^^^^
  File "/Users/milochen/git/py-webapp/chatroom/chatroom/chatroom.py", line 33, in nick_change
    await broadcast_nicks()
  File "/Users/milochen/git/py-webapp/chatroom/chatroom/chatroom.py", line 117, in broadcast_nicks
    await broadcast_event("state.set_nicks", payload=dict(nicks=nicks))
  File "/Users/milochen/git/py-webapp/chatroom/chatroom/chatroom.py", line 94, in broadcast_event
    update = await state._process(
             ^^^^^^^^^^^^^^^^^^^^^
TypeError: object async_generator can't be used in 'await' expression
My Testing Environment
        OS Darwin 22.4.0
        Pynecone 0.1.33
        Python 3.11.3
        Node v16.8.0
        Bun 0.5.9

milochen0418 avatar Jun 11 '23 08:06 milochen0418