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

Missing requirement in flask app [BUG] #391

Open
bar2011 opened this issue Apr 28, 2024 · 1 comment
Open

Missing requirement in flask app [BUG] #391

bar2011 opened this issue Apr 28, 2024 · 1 comment
Labels

Comments

@bar2011
Copy link

bar2011 commented Apr 28, 2024

Bug Description
When building the flask-app Dockerfile there seems to be no problem, but after running a container created from it, it shows the following error:
Traceback (most recent call last): File "./app.py", line 1, in <module> from flask import Flask, render_template File "/usr/local/lib/python3.8/site-packages/flask/__init__.py", line 7, in <module> from .app import Flask as Flask File "/usr/local/lib/python3.8/site-packages/flask/app.py", line 28, in <module> from . import cli File "/usr/local/lib/python3.8/site-packages/flask/cli.py", line 18, in <module> from .helpers import get_debug_flag File "/usr/local/lib/python3.8/site-packages/flask/helpers.py", line 16, in <module> 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)
Bug Fix
Add Werkzeug==2.2.2 to /flask-app/requirements.txt

@bar2011 bar2011 added the bug label Apr 28, 2024
@IIIphr
Copy link

IIIphr commented Jul 23, 2024

Adding Werkzeug to the dependencies fixed it for me. My requirements.txt now looks like this:

Werkzeug==2.3.8
Flask==2.0.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants