dsidlo edited a comment on issue #15768: URL: https://github.com/apache/superset/issues/15768#issuecomment-904004295
I am getting this error on the current master branch... > commit bc4b6f0a6cfb05f0d913a5e4d2dc09844960e04a (HEAD -> master, origin/master, origin/HEAD) > Author: John Bodley <[email protected]> > Date: Mon Aug 23 10:20:52 2021 -0700 I am connecting to postgresql 11.10. Here is what I see in my logs... > superset_app | 2021-08-23 18:17:13,022:INFO:superset.views.core:Triggering query_id: 34 > superset_app | Query 34: Executing 1 statement(s) > superset_app | 2021-08-23 18:17:13,052:INFO:superset.sql_lab:Query 34: Executing 1 statement(s) > superset_app | Query 34: Set query to 'running' > superset_app | 2021-08-23 18:17:13,052:INFO:superset.sql_lab:Query 34: Set query to 'running' > superset_app | Query 34: Running statement 1 out of 1 > superset_app | 2021-08-23 18:17:13,177:INFO:superset.sql_lab:Query 34: Running statement 1 out of 1 > superset_app | Query 34: <class 'TypeError'> > superset_app | Traceback (most recent call last): > superset_app | File "/app/superset/sql_lab.py", line 276, in execute_sql_statement > superset_app | data = db_engine_spec.fetch_data(cursor, increased_limit) > superset_app | File "/app/superset/db_engine_specs/postgres.py", line 174, in fetch_data > superset_app | return super().fetch_data(cursor, limit) > superset_app | File "/app/superset/db_engine_specs/base.py", line 510, in fetch_data > superset_app | raise cls.get_dbapi_mapped_exception(ex) > superset_app | File "/app/superset/db_engine_specs/base.py", line 508, in fetch_data > superset_app | return cursor.fetchall() > superset_app | File "/usr/local/lib/python3.7/site-packages/pytz/__init__.py", line 403, in __init__ > superset_app | if abs(minutes) >= 1440: > superset_app | TypeError: '>=' not supported between instances of 'datetime.timedelta' and 'int' > superset_app | 2021-08-23 18:17:13,201:ERROR:superset.sql_lab:Query 34: <class 'TypeError'> > superset_app | Traceback (most recent call last): > superset_app | File "/app/superset/sql_lab.py", line 276, in execute_sql_statement > superset_app | data = db_engine_spec.fetch_data(cursor, increased_limit) > superset_app | File "/app/superset/db_engine_specs/postgres.py", line 174, in fetch_data > superset_app | return super().fetch_data(cursor, limit) > superset_app | File "/app/superset/db_engine_specs/base.py", line 510, in fetch_data > superset_app | raise cls.get_dbapi_mapped_exception(ex) > superset_app | File "/app/superset/db_engine_specs/base.py", line 508, in fetch_data > superset_app | return cursor.fetchall() > superset_app | File "/usr/local/lib/python3.7/site-packages/pytz/__init__.py", line 403, in __init__ > superset_app | if abs(minutes) >= 1440: > superset_app | TypeError: '>=' not supported between instances of 'datetime.timedelta' and 'int' > superset_app | [SupersetError(message="postgresql error: '>=' not supported between instances of 'datetime.timedelta' and 'int'", error_type=<SupersetErrorType.GENERIC_DB_ENGINE_ERROR: 'GENERIC_DB_ENGINE_ERROR'>, level=<ErrorLevel.ERROR: 'error'>, extra={'engine_name': 'PostgreSQL', 'issue_codes': [{'code': 1002, 'message': 'Issue 1002 - The database returned an unexpected error.'}]})] > superset_app | Traceback (most recent call last): > superset_app | File "/app/superset/views/base.py", line 204, in wraps > superset_app | return f(self, *args, **kwargs) > superset_app | File "/app/superset/utils/log.py", line 242, in wrapper > superset_app | value = f(*args, **kwargs) > superset_app | File "/app/superset/views/core.py", line 2578, in sql_json > superset_app | return self.sql_json_exec(request.json, log_params) > superset_app | File "/app/superset/views/core.py", line 2767, in sql_json_exec > superset_app | session, rendered_query, query, expand_data, log_params > superset_app | File "/app/superset/views/core.py", line 2563, in _sql_json_sync > superset_app | [SupersetError(**params) for params in data["errors"]] > superset_app | superset.exceptions.SupersetErrorsException: [SupersetError(message="postgresql error: '>=' not supported between instances of 'datetime.timedelta' and 'int'", error_type=<SupersetErrorType.GENERIC_DB_ENGINE_ERROR: 'GENERIC_DB_ENGINE_ERROR'>, level=<ErrorLevel.ERROR: 'error'>, extra={'engine_name': 'PostgreSQL', 'issue_codes': [{'code': 1002, 'message': 'Issue 1002 - The database returned an unexpected error.'}]})] > superset_app | 2021-08-23 18:17:13,219:WARNING:superset.views.base:[SupersetError(message="postgresql error: '>=' not supported between instances of 'datetime.timedelta' and 'int'", error_type=<SupersetErrorType.GENERIC_DB_ENGINE_ERROR: 'GENERIC_DB_ENGINE_ERROR'>, level=<ErrorLevel.ERROR: 'error'>, extra={'engine_name': 'PostgreSQL', 'issue_codes': [{'code': 1002, 'message': 'Issue 1002 - The database returned an unexpected error.'}]})] > superset_app | Traceback (most recent call last): > superset_app | File "/app/superset/views/base.py", line 204, in wraps > superset_app | return f(self, *args, **kwargs) > superset_app | File "/app/superset/utils/log.py", line 242, in wrapper > superset_app | value = f(*args, **kwargs) > superset_app | File "/app/superset/views/core.py", line 2578, in sql_json > superset_app | return self.sql_json_exec(request.json, log_params) > superset_app | File "/app/superset/views/core.py", line 2767, in sql_json_exec > superset_app | session, rendered_query, query, expand_data, log_params > superset_app | File "/app/superset/views/core.py", line 2563, in _sql_json_sync > superset_app | [SupersetError(**params) for params in data["errors"]] > superset_app | superset.exceptions.SupersetErrorsException: [SupersetError(message="postgresql error: '>=' not supported between instances of 'datetime.timedelta' and 'int'", error_type=<SupersetErrorType.GENERIC_DB_ENGINE_ERROR: 'GENERIC_DB_ENGINE_ERROR'>, level=<ErrorLevel.ERROR: 'error'>, extra={'engine_name': 'PostgreSQL', 'issue_codes': [{'code': 1002, 'message': 'Issue 1002 - The database returned an unexpected error.'}]})] > The error is... > PostgreSQL Error > postgresql error: '>=' not supported between instances of 'datetime.timedelta' and 'int' > This may be triggered by: > Issue 1002 - The database returned an unexpected error. This is the DDL for the main timestamp field... > created_at TIMESTAMP WITH TIME ZONE -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
