-
-
Notifications
You must be signed in to change notification settings - Fork 632
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
tortoise orm cannot work when I upgrade the version of nicegui to 1.4.x #1901
Comments
Oh dear, it looks like tortoise isn't compatible with the new FastAPI lifespan API: tortoise/tortoise-orm#1371. We upgraded in #1849 because the old API is deprecated. But other libraries still seem to be using it. Maybe we can add support for both, FastAPI below 0.95.0 and above? |
So it seems like we need to wait for tortoise to upgrade? |
I found a workaround: nicegui/examples/sqlite_database/main.py Lines 10 to 19 in 58ab41a
This way we don't have to wait for tortoise/tortoise-orm#1371. 🙂 |
Oh no, the solution causes an exception when closing the app on Python 3.11:
This lets our startup test fail. |
There is a related issue on aiosqlite: omnilib/aiosqlite#241 |
I'm fine with that. I've just tried to reproduce the problem locally. In most cases the demo exits normally. Maybe in 1 out of 10 cases I get the error. |
Strange, it happens all the time on my machine. |
After identifying tortoise/tortoise-orm#1371 and omnilib/aiosqlite#241 as root causes for existing problems with Tortoise, I'll close this issue. |
Description
with nicegui 1.3.18,it works well:
but with 1.4.x, it cannot work, the error is:
The text was updated successfully, but these errors were encountered: