You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "LeonardSchuler (via GitHub)" <gi...@apache.org> on 2023/04/19 16:16:06 UTC

[GitHub] [superset] LeonardSchuler opened a new issue, #23742: superset db upgrade not working due to removal of FLAGS variable in sqlparse/kewords.yp

LeonardSchuler opened a new issue, #23742:
URL: https://github.com/apache/superset/issues/23742

   In [superset/sql_parse.py](https://github.com/apache/superset/blob/master/superset/sql_parse.py#L67) sqlparse.keywords.FLAGS is used. However, sqlparse has removed the FLAGS variable from the code
   [sqlparse/kewords.py](https://github.com/andialbrecht/sqlparse/blob/0.4.4/sqlparse/keywords.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


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] esevato commented on issue #23742: superset db upgrade not working due to removal of FLAGS variable in sqlparse/kewords.py

Posted by "esevato (via GitHub)" <gi...@apache.org>.
esevato commented on issue #23742:
URL: https://github.com/apache/superset/issues/23742#issuecomment-1516902032

   Clean install Debian 11 fails @ "superset db upgrade" with
   `AttributeError: module 'sqlparse.keywords' has no attribute 'FLAGS'`
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] christianxiaobai commented on issue #23742: superset db upgrade not working due to removal of FLAGS variable in sqlparse/kewords.py

Posted by "christianxiaobai (via GitHub)" <gi...@apache.org>.
christianxiaobai commented on issue #23742:
URL: https://github.com/apache/superset/issues/23742#issuecomment-1600029389

   Downgrading with pip install sqlparse=='0.4.3' works. Thanks!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] prb219 commented on issue #23742: superset db upgrade not working due to removal of FLAGS variable in sqlparse/kewords.py

Posted by "prb219 (via GitHub)" <gi...@apache.org>.
prb219 commented on issue #23742:
URL: https://github.com/apache/superset/issues/23742#issuecomment-1634970021

   @LeonardSchuler Thanks for the suggestions. I tried your suggested changes on the following setup but it fails 
   Superset version: 2.1.0
   Python version: 3.8
   SQLparse version: 0.4.4
   
   No issue is observed during the db upgrade process. However, when we try to load the dashboards we see this error 
   `2023-07-13 21:03:58,523:ERROR:superset.views.base:first argument must be string or compiled pattern
   Traceback (most recent call last):
     File "/usr/local/lib/python3.8/site-packages/flask/app.py", line 1517, in full_dispatch_request
       rv = self.dispatch_request()
     File "/usr/local/lib/python3.8/site-packages/flask/app.py", line 1503, in dispatch_request
       return self.ensure_sync(self.view_functions[rule.endpoint])(**req.view_args)
     File "/usr/local/lib/python3.8/site-packages/flask_appbuilder/security/decorators.py", line 95, in wraps
       return f(self, *args, **kwargs)
     File "/usr/local/lib/python3.8/site-packages/superset/views/base_api.py", line 122, in wraps
       raise ex
     File "/usr/local/lib/python3.8/site-packages/superset/views/base_api.py", line 113, in wraps
       duration, response = time_function(f, self, *args, **kwargs)
     File "/usr/local/lib/python3.8/site-packages/superset/utils/core.py", line 1586, in time_function
       response = func(*args, **kwargs)
     File "/usr/local/lib/python3.8/site-packages/superset/utils/log.py", line 266, in wrapper
       value = f(*args, **kwargs)
     File "/usr/local/lib/python3.8/site-packages/superset/charts/data/api.py", line 255, in data
       return self._get_data_response(
     File "/usr/local/lib/python3.8/site-packages/superset/charts/data/api.py", line 411, in _get_data_response
       result = command.run(force_cached=force_cached)
     File "/usr/local/lib/python3.8/site-packages/superset/charts/data/commands/get_data_command.py", line 45, in run
       payload = self._query_context.get_payload(
     File "/usr/local/lib/python3.8/site-packages/superset/common/query_context.py", line 100, in get_payload
       return self._processor.get_payload(cache_query_context, force_cached)
     File "/usr/local/lib/python3.8/site-packages/superset/common/query_context_processor.py", line 477, in get_payload
       query_results = [
     File "/usr/local/lib/python3.8/site-packages/superset/common/query_context_processor.py", line 478, in <listcomp>
       get_query_results(
     File "/usr/local/lib/python3.8/site-packages/superset/common/query_actions.py", line 226, in get_query_results
       return result_func(query_context, query_obj, force_cached)
     File "/usr/local/lib/python3.8/site-packages/superset/common/query_actions.py", line 103, in _get_full
       payload = query_context.get_df_payload(query_obj, force_cached=force_cached)
     File "/usr/local/lib/python3.8/site-packages/superset/common/query_context.py", line 121, in get_df_payload
       return self._processor.get_df_payload(query_obj, force_cached)
     File "/usr/local/lib/python3.8/site-packages/superset/common/query_context_processor.py", line 136, in get_df_payload
       query_result = self.get_query_result(query_obj)
     File "/usr/local/lib/python3.8/site-packages/superset/common/query_context_processor.py", line 214, in get_query_result
       result = query_context.datasource.query(query_object.to_dict())
     File "/usr/local/lib/python3.8/site-packages/superset/connectors/sqla/models.py", line 1903, in query
       query_str_ext = self.get_query_str_extended(query_obj)
     File "/usr/local/lib/python3.8/site-packages/superset/connectors/sqla/models.py", line 884, in get_query_str_extended
       sqlaq = self.get_sqla_query(**query_obj)
     File "/usr/local/lib/python3.8/site-packages/superset/connectors/sqla/models.py", line 1440, in get_sqla_query
       tbl, cte = self.get_from_clause(template_processor)
     File "/usr/local/lib/python3.8/site-packages/superset/connectors/sqla/models.py", line 920, in get_from_clause
       from_sql = self.get_rendered_sql(template_processor)
     File "/usr/local/lib/python3.8/site-packages/superset/connectors/sqla/models.py", line 957, in get_rendered_sql
       sql = sqlparse.format(sql.strip("\t\r\n; "), strip_comments=True)
     File "/usr/local/lib/python3.8/site-packages/sqlparse/__init__.py", line 59, in format
       return ''.join(stack.run(sql, encoding))
     File "/usr/local/lib/python3.8/site-packages/sqlparse/engine/filter_stack.py", line 26, in run
       stream = lexer.tokenize(sql, encoding)
     File "/usr/local/lib/python3.8/site-packages/sqlparse/lexer.py", line 155, in tokenize
       return Lexer.get_default_instance().get_tokens(sql, encoding)
     File "/usr/local/lib/python3.8/site-packages/sqlparse/lexer.py", line 52, in get_default_instance
       cls._default_intance.default_initialization()
     File "/usr/local/lib/python3.8/site-packages/sqlparse/lexer.py", line 59, in default_initialization
       self.set_SQL_REGEX(keywords.SQL_REGEX)
     File "/usr/local/lib/python3.8/site-packages/sqlparse/lexer.py", line 78, in set_SQL_REGEX
       self._SQL_REGEX = [
     File "/usr/local/lib/python3.8/site-packages/sqlparse/lexer.py", line 79, in <listcomp>
       (re.compile(rx, FLAGS).match, tt)
     File "/usr/lib64/python3.8/re.py", line 252, in compile
       return _compile(pattern, flags)
     File "/usr/lib64/python3.8/re.py", line 303, in _compile
       raise TypeError("first argument must be string or compiled pattern")
   TypeError: first argument must be string or compiled pattern`


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] rohitkumar0613 commented on issue #23742: superset db upgrade not working due to removal of FLAGS variable in sqlparse/kewords.py

Posted by "rohitkumar0613 (via GitHub)" <gi...@apache.org>.
rohitkumar0613 commented on issue #23742:
URL: https://github.com/apache/superset/issues/23742#issuecomment-1579973734

   Same didn't work for me


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] enoxos commented on issue #23742: superset db upgrade not working due to removal of FLAGS variable in sqlparse/kewords.py

Posted by "enoxos (via GitHub)" <gi...@apache.org>.
enoxos commented on issue #23742:
URL: https://github.com/apache/superset/issues/23742#issuecomment-1670637266

   If you downgraded to sqlparser=0.4.3 and you get the 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.`
   
   then set the FLASK_APP as follows
   
   `FLASK_APP=superset`
   
   and then rerun the db initialization step.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] amilcarnetto commented on issue #23742: superset db upgrade not working due to removal of FLAGS variable in sqlparse/kewords.py

Posted by "amilcarnetto (via GitHub)" <gi...@apache.org>.
amilcarnetto commented on issue #23742:
URL: https://github.com/apache/superset/issues/23742#issuecomment-1517789743

   downgrading to sqlparse 0.4.3 solve the problem for me


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] mdanishu commented on issue #23742: superset db upgrade not working due to removal of FLAGS variable in sqlparse/kewords.py

Posted by "mdanishu (via GitHub)" <gi...@apache.org>.
mdanishu commented on issue #23742:
URL: https://github.com/apache/superset/issues/23742#issuecomment-1684708378

   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


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] Tafkas commented on issue #23742: superset db upgrade not working due to removal of FLAGS variable in sqlparse/kewords.py

Posted by "Tafkas (via GitHub)" <gi...@apache.org>.
Tafkas commented on issue #23742:
URL: https://github.com/apache/superset/issues/23742#issuecomment-1516853225

   I have the same issue using Python 3.8.16.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] villebro closed issue #23742: superset db upgrade not working due to removal of FLAGS variable in sqlparse/kewords.py

Posted by "villebro (via GitHub)" <gi...@apache.org>.
villebro closed issue #23742: superset db upgrade not working due to removal of FLAGS variable in sqlparse/kewords.py
URL: https://github.com/apache/superset/issues/23742


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] pierrelafortune commented on issue #23742: superset db upgrade not working due to removal of FLAGS variable in sqlparse/kewords.py

Posted by "pierrelafortune (via GitHub)" <gi...@apache.org>.
pierrelafortune commented on issue #23742:
URL: https://github.com/apache/superset/issues/23742#issuecomment-1626402584

   +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.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] SUGAM-ARORA commented on issue #23742: superset db upgrade not working due to removal of FLAGS variable in sqlparse/kewords.py

Posted by "SUGAM-ARORA (via GitHub)" <gi...@apache.org>.
SUGAM-ARORA commented on issue #23742:
URL: https://github.com/apache/superset/issues/23742#issuecomment-1573292494

   > downgrading to sqlparse 0.4.3 solve the problem for me
   
   It didn't work for me .


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] anishone commented on issue #23742: superset db upgrade not working due to removal of FLAGS variable in sqlparse/kewords.py

Posted by "anishone (via GitHub)" <gi...@apache.org>.
anishone commented on issue #23742:
URL: https://github.com/apache/superset/issues/23742#issuecomment-1571085797

   Downgrading with `pip install sqlparse=='0.4.3'` works. Thanks!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] MoronGamer commented on issue #23742: superset db upgrade not working due to removal of FLAGS variable in sqlparse/kewords.py

Posted by "MoronGamer (via GitHub)" <gi...@apache.org>.
MoronGamer commented on issue #23742:
URL: https://github.com/apache/superset/issues/23742#issuecomment-1519073618

   > downgrading to sqlparse 0.4.3 solve the problem for me
   
   Having same error, how do you downgrade sqlparse?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] WaluQ-iu commented on issue #23742: superset db upgrade not working due to removal of FLAGS variable in sqlparse/kewords.py

Posted by "WaluQ-iu (via GitHub)" <gi...@apache.org>.
WaluQ-iu commented on issue #23742:
URL: https://github.com/apache/superset/issues/23742#issuecomment-1719125322

   > /home/ubuntu/.local/bin# sudo -u ubuntu FLASK_APP=superset /home/ubuntu/.local/bin/superset db upgrade
   > 
   > Traceback (most recent call last): File "/home/ubuntu/.local/bin/superset", line 5, in from superset.cli.main import superset File "/home/ubuntu/.local/lib/python3.10/site-packages/superset/**init**.py", line 21, in from superset.app import create_app File "/home/ubuntu/.local/lib/python3.10/site-packages/superset/app.py", line 23, in from superset.initialization import SupersetAppInitializer File "/home/ubuntu/.local/lib/python3.10/site-packages/superset/initialization/**init**.py", line 33, in from superset.extensions import ( File "/home/ubuntu/.local/lib/python3.10/site-packages/superset/extensions/**init**.py", line 32, in from superset.utils.async_query_manager import AsyncQueryManager File "/home/ubuntu/.local/lib/python3.10/site-packages/superset/utils/async_query_manager.py", line 26, in from superset.utils.core import get_user_id File "/home/ubuntu/.local/lib/python3.10/site-packages/superset/utils/core.py", line 106, in from superset.sql_parse import sanitize_clause F
 ile "/home/ubuntu/.local/lib/python3.10/site-packages/superset/sql_parse.py", line 67, in re.compile(r"'(''|\\|\|[^'])*'", sqlparse.keywords.FLAGS).match, AttributeError: module 'sqlparse.keywords' has no attribute 'FLAGS'
   
   `AttributeError: module 'sqlparse.keywords' has no attribute 'FLAGS'` suggests a compatibility issue or version mismatch with the libraries or modules being used by Superset. Specifically, it mentions an AttributeError related to the FLAGS attribute in the sqlparse.keywords module. Comments above state that you need to downgrade sqlparse to a lower version, check comments above. 
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] kits-ragh commented on issue #23742: superset db upgrade not working due to removal of FLAGS variable in sqlparse/kewords.py

Posted by "kits-ragh (via GitHub)" <gi...@apache.org>.
kits-ragh commented on issue #23742:
URL: https://github.com/apache/superset/issues/23742#issuecomment-1607067303

   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.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] WaluQ-iu commented on issue #23742: superset db upgrade not working due to removal of FLAGS variable in sqlparse/kewords.py

Posted by "WaluQ-iu (via GitHub)" <gi...@apache.org>.
WaluQ-iu commented on issue #23742:
URL: https://github.com/apache/superset/issues/23742#issuecomment-1710278667

   > 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


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [I] superset db upgrade not working due to removal of FLAGS variable in sqlparse/kewords.py [superset]

Posted by "EJ-Humn (via GitHub)" <gi...@apache.org>.
EJ-Humn commented on issue #23742:
URL: https://github.com/apache/superset/issues/23742#issuecomment-1801789609

   > In [superset/sql_parse.py](https://github.com/apache/superset/blob/master/superset/sql_parse.py#L67) sqlparse.keywords.FLAGS is used. However, sqlparse has removed the FLAGS variable from the code [sqlparse/kewords.py](https://github.com/andialbrecht/sqlparse/blob/0.4.4/sqlparse/keywords.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
   
   This worked for me:
   
   `re.compile(r"'(''|\\\\|\\|[^'])*'", re.IGNORECASE | re.UNICODE).match,`


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] HoncyLee commented on issue #23742: superset db upgrade not working due to removal of FLAGS variable in sqlparse/kewords.py

Posted by "HoncyLee (via GitHub)" <gi...@apache.org>.
HoncyLee commented on issue #23742:
URL: https://github.com/apache/superset/issues/23742#issuecomment-1519169471

   > > 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'


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] Akshay577 commented on issue #23742: superset db upgrade not working due to removal of FLAGS variable in sqlparse/kewords.py

Posted by "Akshay577 (via GitHub)" <gi...@apache.org>.
Akshay577 commented on issue #23742:
URL: https://github.com/apache/superset/issues/23742#issuecomment-1521162810

   Yes, downgrading the sqlparse version to 0.4.3 fixed the issue for me.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] helpwise commented on issue #23742: superset db upgrade not working due to removal of FLAGS variable in sqlparse/kewords.py

Posted by "helpwise (via GitHub)" <gi...@apache.org>.
helpwise commented on issue #23742:
URL: https://github.com/apache/superset/issues/23742#issuecomment-1719108219

   /home/ubuntu/.local/bin# sudo -u ubuntu FLASK_APP=superset /home/ubuntu/.local/bin/superset db upgrade
   
   Traceback (most recent call last):
     File "/home/ubuntu/.local/bin/superset", line 5, in <module>
       from superset.cli.main import superset
     File "/home/ubuntu/.local/lib/python3.10/site-packages/superset/__init__.py", line 21, in <module>
       from superset.app import create_app
     File "/home/ubuntu/.local/lib/python3.10/site-packages/superset/app.py", line 23, in <module>
       from superset.initialization import SupersetAppInitializer
     File "/home/ubuntu/.local/lib/python3.10/site-packages/superset/initialization/__init__.py", line 33, in <module>
       from superset.extensions import (
     File "/home/ubuntu/.local/lib/python3.10/site-packages/superset/extensions/__init__.py", line 32, in <module>
       from superset.utils.async_query_manager import AsyncQueryManager
     File "/home/ubuntu/.local/lib/python3.10/site-packages/superset/utils/async_query_manager.py", line 26, in <module>
       from superset.utils.core import get_user_id
     File "/home/ubuntu/.local/lib/python3.10/site-packages/superset/utils/core.py", line 106, in <module>
       from superset.sql_parse import sanitize_clause
     File "/home/ubuntu/.local/lib/python3.10/site-packages/superset/sql_parse.py", line 67, in <module>
       re.compile(r"'(''|\\\\|\\|[^'])*'", sqlparse.keywords.FLAGS).match,
   AttributeError: module 'sqlparse.keywords' has no attribute 'FLAGS'
   
   FLASK_APP=superset  doesnt work for me either..


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org