I recently upgraded from QuestDB 7.4.2 to QuestDB 8.1.2. I use Apache Superset 4.0.0 for visualisation, and this worked fine before the upgrade, but now the questdb-connect
library is throwing an unhelpful error:
2024-10-28T13:28:21.521208472Z ERROR:flask_appbuilder.api:'NoneType' object is not callable
2024-10-28T13:28:21.521233355Z Traceback (most recent call last):
2024-10-28T13:28:21.521237176Z File "/usr/local/lib/python3.10/site-packages/flask_appbuilder/api/__init__.py", line 110, in wraps
2024-10-28T13:28:21.521240585Z return f(self, *args, **kwargs)
2024-10-28T13:28:21.521242959Z File "/app/superset/views/base_api.py", line 127, in wraps
2024-10-28T13:28:21.521245388Z raise ex
2024-10-28T13:28:21.521248040Z File "/app/superset/views/base_api.py", line 121, in wraps
2024-10-28T13:28:21.521250464Z duration, response = time_function(f, self, *args, **kwargs)
2024-10-28T13:28:21.521253488Z File "/app/superset/utils/core.py", line 1463, in time_function
2024-10-28T13:28:21.521255789Z response = func(*args, **kwargs)
2024-10-28T13:28:21.521258381Z File "/app/superset/utils/log.py", line 255, in wrapper
2024-10-28T13:28:21.521261480Z value = f(*args, **kwargs)
2024-10-28T13:28:21.521263836Z File "/app/superset/databases/api.py", line 742, in table_metadata
2024-10-28T13:28:21.521266910Z table_info = get_table_metadata(database, table_name, schema_name)
2024-10-28T13:28:21.521269293Z File "/app/superset/databases/utils.py", line 67, in get_table_metadata
2024-10-28T13:28:21.521271766Z columns = database.get_columns(table_name, schema_name)
2024-10-28T13:28:21.521274575Z File "/app/superset/models/core.py", line 839, in get_columns
2024-10-28T13:28:21.521277035Z return self.db_engine_spec.get_columns(
2024-10-28T13:28:21.521279705Z File "/app/superset/db_engine_specs/base.py", line 1340, in get_columns
2024-10-28T13:28:21.521282333Z cast(list[SQLAColumnType], inspector.get_columns(table_name, schema))
2024-10-28T13:28:21.521284920Z File "/usr/local/lib/python3.10/site-packages/questdb_connect/inspector.py", line 79, in get_columns
2024-10-28T13:28:21.521287336Z return self.format_table_columns(table_name, result_set)
2024-10-28T13:28:21.521289845Z File "/usr/local/lib/python3.10/site-packages/questdb_connect/inspector.py", line 87, in format_table_columns
2024-10-28T13:28:21.521292427Z return [
2024-10-28T13:28:21.521294748Z File "/usr/local/lib/python3.10/site-packages/questdb_connect/inspector.py", line 90, in <listcomp>
2024-10-28T13:28:21.521297122Z "type": resolve_type_from_name(row[1])(),
2024-10-28T13:28:21.521299536Z TypeError: 'NoneType' object is not callable
I'm not sure what's wrong, has support for Superset been discontinued? Why won't my code work any more?
This was a problem in questdb-connect version 1.1.2 and older versions. questdb-connect 1.1.3 now supports the VARCHAR type, so workarounds are no longer needed.