我是nicegui的新手。这似乎是一个很棒的框架!
尝试设置 Nicegui 时,我从以下设置代码中收到错误:
main.py:
from nicegui import ui
ui.label('Hello NiceGUI!')
ui.run()
我在虚拟环境中,导入了nicegui。
这是我收到的很长错误的顶部:
'int' object has no attribute 'items'
+ Exception Group Traceback (most recent call last):
| File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/starlette/_utils.py", line 82, in collapse_excgroups
| yield
| File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/starlette/middleware/base.py", line 193, in __call__
| response_sent.set()
| File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/anyio/_backends/_asyncio.py", line 678, in __aexit__
| raise BaseExceptionGroup(
| exceptiongroup.ExceptionGroup: unhandled errors in a TaskGroup (1 sub-exception)
+-+---------------- 1 ----------------
| Traceback (most recent call last):
| File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/starlette/middleware/errors.py", line 164, in __call__
| await self.app(scope, receive, _send)
我尝试在虚拟环境中重新导入nicegui并查看库代码,均无济于事。
如果我遗漏了什么,请告诉我!
谢谢你。
请参阅https://github.com/zauberzeug/nicegui/issues/2247。 昨晚发布的新 FastAPI 0.108.0 存在兼容性问题。我们即将在 NiceGUI 1.4.8 中发布错误修复。