-
Notifications
You must be signed in to change notification settings - Fork 14k
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
superset db upgrade not working due to removal of FLAGS variable in sqlparse/kewords.py #23742
Comments
I have the same issue using Python 3.8.16. |
Clean install Debian 11 fails @ "superset db upgrade" with |
downgrading to sqlparse 0.4.3 solve the problem for me |
Having same error, how do you downgrade sqlparse? |
pip install sqlparse=='0.4.3' |
Yes, downgrading the sqlparse version to 0.4.3 fixed the issue for me. |
Downgrading with |
It didn't work for me . |
Same didn't work for me |
Downgrading with pip install sqlparse=='0.4.3' works. Thanks! |
After downgrading sqlparse to 0.4.3 getting following error. Error: Could not locate a Flask application. You did not provide the "FLASK_APP" environment variable, and a "wsgi.py" or "app.py" module was not found in the current directory. |
+1 to the same FLASK APP error as @kits-ragh Error: Could not locate a Flask application. You did not provide the "FLASK_APP" environment variable, and a "wsgi.py" or "app.py" module was not found in the current directory. |
@LeonardSchuler Thanks for the suggestions. I tried your suggested changes on the following setup but it fails No issue is observed during the db upgrade process. However, when we try to load the dashboards we see this error ` |
If you downgraded to sqlparser=0.4.3 and you get the error:
then set the FLASK_APP as follows
and then rerun the db initialization step. |
I'm still getting this flags problem... why is this happening and how can we fix it? downgrading to lower versions didn't fix it |
Try export FLASK_APP=superset and then rerun |
/home/ubuntu/.local/bin# sudo -u ubuntu FLASK_APP=superset /home/ubuntu/.local/bin/superset db upgrade Traceback (most recent call last): FLASK_APP=superset doesnt work for me either.. I am running Ubuntu 20.04 in Proxmox |
|
This worked for me:
|
In superset/sql_parse.py sqlparse.keywords.FLAGS is used. However, sqlparse has removed the FLAGS variable from the code sqlparse/kewords.py.
This leads to an AttributeError when running the CLI command
$ superset db upgrade
AttributeError: module 'sqlparse.keywords' has no attribute 'FLAGS'
I would recommend replacing the FLAGS dependency with the actual value
re.IGNORECASE | re.UNICODE).match
or fix the sqlparse version to "sqlparse==0.4.3" (not recommended as they fixed a security problem recently).
I have experienced this problem under python3.9 and python3.11
The text was updated successfully, but these errors were encountered: