superset: superset db upgrade not working due to removal of FLAGS variable in sqlparse/kewords.py
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
About this issue
- Original URL
- State: closed
- Created a year ago
- Reactions: 12
- Comments: 19
downgrading to sqlparse 0.4.3 solve the problem for me
pip install sqlparse==‘0.4.3’