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

Werkzeug version ImportError #387

Open
wmauz opened this issue Mar 1, 2024 · 2 comments · May be fixed by #393
Open

Werkzeug version ImportError #387

wmauz opened this issue Mar 1, 2024 · 2 comments · May be fixed by #393

Comments

@wmauz
Copy link

wmauz commented Mar 1, 2024

Got error when running docker run /catnip. Fixed it by updating Werkzueg version to 2.2.2 in requirements.txt.
Seems to be a missmatch between Flask and Werkzeug versions.

ERROR:
Traceback (most recent call last):
File "./app.py", line 1, in
from flask import Flask, render_template
File "/usr/local/lib/python3.8/site-packages/flask/init.py", line 7, in
from .app import Flask as Flask
File "/usr/local/lib/python3.8/site-packages/flask/app.py", line 28, in
from . import cli
File "/usr/local/lib/python3.8/site-packages/flask/cli.py", line 18, in
from .helpers import get_debug_flag
File "/usr/local/lib/python3.8/site-packages/flask/helpers.py", line 16, in
from werkzeug.urls import url_quote
ImportError: cannot import name 'url_quote' from 'werkzeug.urls' (/usr/local/lib/python3.8/site-packages/werkzeug/urls.py)

@MichaelWStuart
Copy link

Update the flask version in requirements.tsx

@william2032
Copy link

Hello ,I tried the solution stated above but didn't work.So tried deleting the my docker image and recreating it again and worked for me.
Flask==3.0.0
Werkzeug==3.0.0

elbaby added a commit to elbaby/docker-curriculum that referenced this issue May 9, 2024
@elbaby elbaby linked a pull request May 9, 2024 that will close this issue
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

Successfully merging a pull request may close this issue.

3 participants