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

Error: While importing 'app', an ImportError was raised: #36

Open
mwolfaardt opened this issue Jan 23, 2023 · 1 comment
Open

Error: While importing 'app', an ImportError was raised: #36

mwolfaardt opened this issue Jan 23, 2023 · 1 comment

Comments

@mwolfaardt
Copy link

I've just installed and I get the following errors :
Checking for script in /app/prestart.sh
Running script /app/prestart.sh
Run flask migration upgrades (show current version first)
Usage: flask db current [OPTIONS]
Try 'flask db current --help' for help.
Error: While importing 'app', an ImportError was raised:
Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/flask/cli.py", line 218, in locate_app
import(module_name)
File "/app/app.py", line 6, in
from flask_login import LoginManager
File "/usr/local/lib/python3.8/site-packages/flask_login/init.py", line 16, in
from .login_manager import LoginManager
File "/usr/local/lib/python3.8/site-packages/flask_login/login_manager.py", line 24, in
from .utils import (login_url as make_login_url, _create_identifier,
File "/usr/local/lib/python3.8/site-packages/flask_login/utils.py", line 13, in
from werkzeug.security import safe_str_cmp
ImportError: cannot import name 'safe_str_cmp' from 'werkzeug.security' (/usr/local/lib/python3.8/site-packages/werkzeug/security.py)
Checking for script in /app/prestart.sh
Running script /app/prestart.sh
Run flask migration upgrades (show current version first)
Usage: flask db current [OPTIONS]
Try 'flask db current --help' for help.
Error: While importing 'app', an ImportError was raised:
Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/flask/cli.py", line 218, in locate_app
import(module_name)
File "/app/app.py", line 6, in
from flask_login import LoginManager
File "/usr/local/lib/python3.8/site-packages/flask_login/init.py", line 16, in
from .login_manager import LoginManager
File "/usr/local/lib/python3.8/site-packages/flask_login/login_manager.py", line 24, in
from .utils import (login_url as make_login_url, _create_identifier,
File "/usr/local/lib/python3.8/site-packages/flask_login/utils.py", line 13, in
from werkzeug.security import safe_str_cmp
ImportError: cannot import name 'safe_str_cmp' from 'werkzeug.security' (/usr/local/lib/python3.8/site-packages/werkzeug/security.py)

@Nindouja
Copy link

Nindouja commented Jan 30, 2023

I have the same problem

ImportError: cannot import name 'safe_str_cmp' from 'werkzeug.security' (/usr/local/lib/python3.8/site-packages/werkzeug/security.py)
Checking for script in /app/prestart.sh
Running script /app/prestart.sh
Run flask migration upgrades (show current version first)
Usage: flask db current [OPTIONS]
Try 'flask db current --help' for help.
Error: While importing 'app', an ImportError was raised:
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/flask/cli.py", line 218, in locate_app
    __import__(module_name)
  File "/app/app.py", line 6, in <module>
    from flask_login import LoginManager
  File "/usr/local/lib/python3.8/site-packages/flask_login/__init__.py", line 16, in <module>
    from .login_manager import LoginManager
  File "/usr/local/lib/python3.8/site-packages/flask_login/login_manager.py", line 24, in <module>
    from .utils import (login_url as make_login_url, _create_identifier,
  File "/usr/local/lib/python3.8/site-packages/flask_login/utils.py", line 13, in <module>
    from werkzeug.security import safe_str_cmp

Probably a duplicate of #19
There seems to be a fix but it has not been merged since 5 months :/

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