Skip to content

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

@milochen0418

Description

@milochen0418

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions