-
Notifications
You must be signed in to change notification settings - Fork 14.5k
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
Flask Application Not Found After Upgrading from Python 3.6 and Apache Superset 0.38.1 to Python 3.10 and Superset 4.1.1 #32140
Comments
Hey there, @bondany! I'm here to help you with any bugs, questions, or contributions you have. Let's squash those bugs together! 🐞 I found a similar unsolved discussion that might be relevant to your issue: install apache-superset==3.1.0 on win10 successfully, but Regarding your issue, the error message "Could not locate a Flask application" typically indicates that the
If these steps do not resolve the issue, it might be helpful to provide more detailed logs or error messages to further diagnose the problem. To continue talking to Dosu, mention @dosu. Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Other |
Installing $ python -m pip install Flask==2.0.2 Werkzeug==2.0.2
Collecting Flask==2.0.2
Downloading Flask-2.0.2-py3-none-any.whl.metadata (3.8 kB)
Collecting Werkzeug==2.0.2
Downloading Werkzeug-2.0.2-py3-none-any.whl.metadata (4.5 kB)
[...]
Installing collected packages: Werkzeug, Flask
'ERROR: pip''s dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
apache-superset 4.1.1 requires flask<3.0.0,>=2.2.5, but you have flask 2.0.2 which is incompatible.
flask-session 0.8.0 requires flask>=2.2, but you have flask 2.0.2 which is incompatible.' |
Apache Superset 4.1.1 requires specific versions of Flask and Werkzeug to function correctly. The required versions are Flask 2.3.3 and Werkzeug 3.1.3 [1]. Installing older versions like Flask 2.0.2 and Werkzeug 2.0.2 will lead to dependency conflicts, as you've experienced. To resolve the issue, ensure that you have the correct versions installed by running: python -m pip install Flask==2.3.3 Werkzeug==3.1.3 This should align with the requirements of Superset 4.1.1 and help avoid compatibility issues. To continue talking to Dosu, mention @dosu. Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Other |
Ironically, installing |
UpdateApparently the message appears only when using |
For export/import, I can't remember when it changed from yaml to zip, but you may need to import yaml at some intermediary version while there was still support for that. That's a big leap in upgrades, I think you'll be happy with the current state of the app when you get there! |
Bug description
Hello,
We are upgrading from a very old version of Superset and have successfully exported and imported datasets.
Older Version Details:
Export Command on the Old Environment:
(Note: I noticed that it is not actually a zip file but a YAML file, contrary to what is explained in the docs.)
Newer Version Details:
Import Command on the New Environment:
After completing the upgrade and importing the dataset, we encountered the following error when trying to run Superset:
Current ENV
SHELL=/bin/bash NVM_INC=/home/superset/.nvm/versions/node/v22.13.0/include/node HISTTIMEFORMAT=%F %T PWD=/home/superset LOGNAME=superset HOME=/home/superset LANG=C.UTF-8 LS_COLORS=... VIRTUAL_ENV=/home/superset/superset_env SUPERSET_HOME=/home/superset/.data/superset SUPERSET_SECRET_KEY=REDACTED NVM_DIR=/home/superset/.nvm SGX_AESM_ADDR=1 LESSCLOSE=/usr/bin/lesspipe %s %s PYTHONPATH=/home/superset/.config/superset: TERM=xterm LESSOPEN=| /usr/bin/lesspipe %s USER=superset FLASK_APP=superset SHLVL=1 NVM_CD_FLAGS= VIRTUAL_ENV_PROMPT=superset_env PS1=... GCC_COLORS=error=... XDG_DATA_DIRS=/usr/local/share:/usr/share:/var/lib/snapd/desktop PATH=/home/superset/superset_env/bin:/home/superset/.nvm/versions/node/v22.13.0/bin:/usr/bin/:/usr/sbin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin NVM_BIN=/home/superset/.nvm/versions/node/v22.13.0/bin MAIL=/var/mail/superset _=/usr/bin/printenv
As a last resort, after a couple of days of debugging, we executed the following commands:
Additionally, I created an admin user for Flask as follows:
(source: https://www.cnblogs.com/qq2483763504/p/16718615.html)
But the problem still persist.
Can someone help us understand if this is a bug or bad configuration.
Thank you!
Screenshots/recordings
No response
Superset version
4.1.1
Python version
3.10
Node version
18 or greater
Browser
Not applicable
Additional context
No response
Checklist
The text was updated successfully, but these errors were encountered: