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

Docs wrong for dropping all cards #2319

Closed
mtanco opened this issue Apr 24, 2024 · 1 comment · Fixed by #2320
Closed

Docs wrong for dropping all cards #2319

mtanco opened this issue Apr 24, 2024 · 1 comment · Fixed by #2320
Labels
bug Bug in code docs Documentation

Comments

@mtanco
Copy link
Contributor

mtanco commented Apr 24, 2024

Wave SDK Version, OS

image

This is not an await function, so docs are wrong

@app("/")
async def serve(q: Q):

    await q.page.drop()

    await q.page.save()  # Update the UI
Error
Traceback (most recent call last):
  File "/Users/mtanco/PycharmProjects/att_training/.venv/lib/python3.12/site-packages/h2o_wave/server.py", line 360, in _process
    await self._handle(q)
  File "/Users/mtanco/PycharmProjects/att_training/chat.py", line 22, in serve
    await q.page.drop()
TypeError: object NoneType can't be used in 'await' expression

works if you remove await

@mtanco mtanco added the bug Bug in code label Apr 24, 2024
@mtanco mtanco changed the title Cannot drop all cards Docs wrong for dropping all cards Apr 24, 2024
@marek-mihok marek-mihok added the docs Documentation label Apr 25, 2024
@marek-mihok
Copy link
Contributor

@mtanco, thanks for noticing!

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

Successfully merging a pull request may close this issue.

2 participants