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

has no attribute 'get_locale' #687

Closed
benben17 opened this issue May 26, 2024 · 1 comment
Closed

has no attribute 'get_locale' #687

benben17 opened this issue May 26, 2024 · 1 comment

Comments

@benben17
Copy link

python 3.12
mac os 14.5
执行: python main.py debug 调试模式
File "/Users/xxx /PycharmProjects/KindleEar/application/init.py", line 31, in init_app
babel.init_app(app, locale_selector=setting.get_locale)
^^^^^^^^^^^^^^^^^^
AttributeError: partially initialized module 'application.view.setting' has no attribute 'get_locale' (most likely due to a circular import)

@cdhigh
Copy link
Owner

cdhigh commented May 26, 2024

Windows和Linux都没问题,我不太相信是MacOS的问题,是否python3.12修改了什么import机制?

如果这个命令出问题,可以使用:

python -m flask run --host=0.0.0.0 --debug

@cdhigh cdhigh closed this as completed May 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants