You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2022/03/18 13:04:54 UTC

[GitHub] [superset] Yanwenjingcn opened a new issue #19253: clickhouse / sql_lab : return 'NoneType' object has no attribute 'startswith'

Yanwenjingcn opened a new issue #19253:
URL: https://github.com/apache/superset/issues/19253


   A clear and concise description of what the bug is.
   
   #### How to reproduce the bug
   
   1. config database
       clickhouse://test:XXXXXXXXXX@127.0.0.1:8888/default
   2. go to sql_lab
   3. run a clickhouse sql 
   ![image](https://user-images.githubusercontent.com/16257260/159006975-d3bee7ef-25f9-46ea-bd84-f1b4a69b35f2.png)
   
   
   error log:
   2022-03-18 20:33:51,425:DEBUG:urllib3.connectionpool:http://180.97.87.196:8070 "POST /?query_id=77d02bd7-28ad-418f-b23d-6ff575f5e55f&database=default HTTP/1.1" 200 None
   2022-03-18 20:33:51,426:DEBUG:superset.stats_logger:[stats_logger] (timing) sqllab.query.time_executing_query | 97.369140625 
   2022-03-18 20:33:51,428:ERROR:superset.sql_lab:Query 6: <class 'AttributeError'>
   Traceback (most recent call last):
     File "/Users/test/projects/PycharmProjects/superset/superset/sql_lab.py", line 248, in execute_sql_statement
       db_engine_spec.execute(cursor, sql, async_=True)
     File "/Users/test/projects/PycharmProjects/superset/superset/db_engine_specs/base.py", line 1098, in execute
       raise cls.get_dbapi_mapped_exception(ex)
     File "/Users/test/projects/PycharmProjects/superset/superset/db_engine_specs/base.py", line 1096, in execute
       cursor.execute(query)
     File "/Users/test/sandai/py3env/lib/python3.9/site-packages/clickhouse_sqlalchemy/drivers/http/connector.py", line 117, in execute
       self._process_response(response_gen)
     File "/Users/test/sandai/py3env/lib/python3.9/site-packages/clickhouse_sqlalchemy/drivers/http/connector.py", line 216, in _process_response
       self._columns = next(response, None)
     File "/Users/test/sandai/py3env/lib/python3.9/site-packages/clickhouse_sqlalchemy/drivers/http/transport.py", line 136, in execute
       convs = [_get_type(type_) for type_ in types]
     File "/Users/test/sandai/py3env/lib/python3.9/site-packages/clickhouse_sqlalchemy/drivers/http/transport.py", line 136, in <listcomp>
       convs = [_get_type(type_) for type_ in types]
     File "/Users/test/sandai/py3env/lib/python3.9/site-packages/clickhouse_sqlalchemy/drivers/http/transport.py", line 81, in _get_type
       if type_str.startswith('Decimal'):
   AttributeError: 'NoneType' object has no attribute 'startswith'
   2022-03-18 20:33:51,428:DEBUG:superset.sql_lab:Query 6: 'NoneType' object has no attribute 'startswith'
   2022-03-18 20:33:51,449:WARNING:superset.views.base:[SupersetError(message="clickhouse error: 'NoneType' object has no attribute 'startswith'", error_type=<SupersetErrorType.GENERIC_DB_ENGINE_ERROR: 'GENERIC_DB_ENGINE_ERROR'>, level=<ErrorLevel.ERROR: 'error'>, extra={'engine_name': 'ClickHouse', 'issue_codes': [{'code': 1002, 'message': 'Issue 1002 - The database returned an unexpected error.'}]})]
   
   
   
   ### Environment
   
   (please complete the following information):
   - browser type and version: chrom
   - superset version:  1.4.1
   - python version: 3.9 3.8
   - node.js version: 16.9.1
   
   ![Uploading image.png…]()
   
   
   
   ### Checklist
   
   Make sure to follow these steps before submitting your issue - thank you!
   
   - [ Y ] I have checked the superset logs for python stacktraces and included it here as text if there are any.
   - [ Y ] I have reproduced the issue with at least the latest released version of superset.
   - [ N ] I have checked the issue tracker for the same issue and I haven't found one similar.
   
   
   
   
   


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