brettkromkamp / contextualise

Contextualise is an effective tool particularly suited for organising information-heavy projects and activities consisting of unstructured and widely diverse data and information resources

Home Page:https://contextualise.dev/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Fix "ImportError: cannot import name 'safe_str_cmp' from 'werkzeug.security'" after upgrading to Flask/Werkzeug 2.10

brettkromkamp opened this issue · comments

Got an import error after upgrading to Flask/Werkzeug 2.10:
Traceback (most recent call last): File "/home/brettk/.pyenv/versions/3.10.3/envs/contextualise-dev-2/lib/python3.10/site-packages/flask/cli.py", line 234, in locate_app __import__(module_name) File "/home/brettk/Source/structured-knowledge/contextualise/contextualise/__init__.py", line 14, in <module> from flask_seasurf import SeaSurf File "/home/brettk/.pyenv/versions/3.10.3/envs/contextualise-dev-2/lib/python3.10/site-packages/flask_seasurf.py", line 30, in <module> from werkzeug.security import safe_str_cmp ImportError: cannot import name 'safe_str_cmp' from 'werkzeug.security' (/home/brettk/.pyenv/versions/3.10.3/envs/contextualise-dev-2/lib/python3.10/site-packages/werkzeug/security.py)

The problem is with the Flask-SeaSurf extension. Perhaps time to migrate to Flask-WTF.

Relevant URLs:

Initial testing confirms that this was fixed with: maxcountryman/flask-seasurf#108. Once definitively confirmed that this has been fixed, this issue will be closed.

Confirmed to be fixed with latest Flask-SeaSurf update.