-
Notifications
You must be signed in to change notification settings - Fork 15
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
LookupError in core.py after latest update (0.0.9) #36
Comments
Hello
also, you can use the depends
|
It seems that a minimal app works as expected as shown in your examples. However, in order to get strings from my API router, I had to use both
This was not the case in v0.0.8. Is this a reasonable approach? |
If you want to use The best solution is:
and use the Why you should use the lazy_gettext instead of simple so the ideal solution is to use the lazy_gettext instead of that. Note You cannot import the lazy_gettext side by side of the simple gettext. I'd like to refer you to the Django documentation about this topic to get my statements. In this example, I've demonstrated the usage of the lazy_gettext for translating wtform input labels. |
Thank you for your help. |
Hi! First of all, thank you for this amazing library! I'd like to reopen this issue because I have a similar problem and I wasn't able to solve it. I'm using Version: 0.0.9. In my application I use the
Here's a simplified version of my issue, which still illustrates the problem
Do you have any suggestions on how to resolve this issue @Legopapurida ? I read your comment mentioning lazy_gettext, but I was not able to apply it to my case... |
Updating to 0.0.9 breaks my app. This happened again with 0.0.8. I think @Legopapurida might be going in circles on this one. I don't have the time to try to find a workaround so I downgraded to 0.0.8. If you don't have problems with that version you might stick with it for now. It works perfectly fine for me. |
Hello dear friend I should create a context invoker for resolving this problem. |
You must use the FastAPI background task and make_gettext as dependency injection. you need to merge these two approaches to achieve the best result. If you want to handle this issue without my idea, you may need to use the queue and thread shared memory concept. please try those solutions, If you can't get good output please let me know to find a better way to handle this issue. |
I had the same problem. I'm using alembic, It doesn't have a fastapi context, and it doesn't seem to need a context for revision. So is there a better solution? |
I will check this out and resolve the issues immediately @Gu-f |
Hi,
I just want to say thank you for your work. I use fastapi-babel and it has been working fine so far.
After the latest update I get this:
Here is my config file:
Please note that I made a dependency to set the locale globally because using fastapi-babel as middleware was breaking my app in other ways.
The text was updated successfully, but these errors were encountered: