Closed wesamhamad closed 5 months ago
I have applied a temporary resolution to address the dependency conflict. The specific versions have been changed in requirements.txt
to resolve the conflict:
Flask
click==8.1.2 # Changed to specific version to resolve conflict
Jinja2==3.1.2 # Changed to specific version to resolve conflict
Werkzeug==2.3.7 # Changed to specific version to resolve conflict
If changing flask==2.3.3
to flask
it works, then it means we are pulling the latest version of flask (which is 3.0.0).
why don't you try flask==3.0.0
?
I've checked my Flask version using pip show Flask
, and it confirms that I'm currently on version 2.3.3, so I used it. However, I also attempted flask==3.0.0
in the requirements.txt
. Unfortunately, it resulted in a similar conflict issue.
I encountered a dependency conflict while trying to install the dependencies for Flask version 3.0.0. The conflicts arise with the following packages and their versions:
Click:
Werkzeug:
requirements.txt
:Flask==3.0.0
click>=8.1.2
Werkzeug>=3.0.0
I encountered the following error:
Traceback (most recent call last):
File "/root/src/flask-website/app.py", line 2, in <module>
from flask_sqlalchemy import SQLAlchemy
File "/usr/local/lib/python3.9/site-packages/flask_sqlalchemy/__init__.py", line 14, in <module>
from flask import _app_ctx_stack, abort, current_app, request
ImportError: cannot import name '_app_ctx_stack' from 'flask' (/usr/local/lib/python3.9/site-packages/flask/__init__.py)
I'll investigate this issue further and provide updates as soon as possible.
If changing
flask==2.3.3
toflask
it works, then it means we are pulling the latest version of flask (which is 3.0.0). why don't you tryflask==3.0.0
?
It appears that the same error persists even after commit number 7ae125515b46715caf62b6e3abac59b9443c7335
.
Flask==2.0.2 #effectively fixed the issue
Description
I encountered an ImportError while trying to run my Flask application inside a Docker container. The error traceback indicates an issue with the import of 'url_decode' from 'werkzeug.urls'. Here are the details:
Error Traceback:
Additional Information:
This issue arises after encountering multiple dependency conflicts during the Docker image build process. Specifically, conflicts with Click, Jinja2, and Werkzeug versions were identified. The original issue report with details on the dependency conflicts is here.
Please note that changing Flask to Flask==2.3.3 triggered this problem.