Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
milochen0418 opened this issue Jun 11, 2023 · 2 comments
Open

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

milochen0418 opened this issue Jun 11, 2023 · 2 comments

Comments

@milochen0418
Copy link
Contributor

milochen0418 commented Jun 11, 2023

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
@masenf
Copy link
Collaborator

masenf commented Jun 28, 2023

fixed in #124

@milochen0418
Copy link
Contributor Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants