Replies: 2 comments 1 reply
-
多谢反馈,看了一下,这个是之前某次更新引入的bug,很快就可以修复 |
Beta Was this translation helpful? Give feedback.
0 replies
-
已经在 157b1a3 这个提交中修复了。 |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
版本1.5
按照文档描述,协程会话中,put_button的callback可以是协程,但用以下测试代码报错
async def wait(test):
await asyncio.sleep(0.001)
print(test)
async def main():
await wait("async_call")
put_text('Hello')
put_buttons(['RUN'], onclick=wait)
start_server(main, auto_open_webbrowser=True)
2021-12-23 23:14:44,649 INFO 2239 [tornado.access] 101 GET /?app=index&session=NEW (::1) 1.13ms
async_call
/lib/python3.8/site-packages/pywebio/output.py:805: RuntimeWarning: coroutine 'wait' was never awaited
onclick(btn_val)
RuntimeWarning: Enable tracemalloc to get the object allocation traceback
观察了output.py的源代码,好像并没有进行协程化的相应处理啊?
Beta Was this translation helpful? Give feedback.
All reactions