taosdata / taosdata/taos-connector-python

superset使用ws连接报错

Open
#346 2 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
61
Forks
17
PR merge metrics
No merged PRs in 30d

Description

Version

td 3.3.6.9
taos-ws-py 0.5.3
taospy 2.8.1

Traceback
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/flask/app.py", line 1484, in full_dispatch_request
    rv = self.dispatch_request()
  File "/usr/local/lib/python3.10/site-packages/flask/app.py", line 1469, in dispatch_request
    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
  File "/usr/local/lib/python3.10/site-packages/flask_appbuilder/security/decorators.py", line 95, in wraps
    return f(self, *args, **kwargs)
  File "/app/superset/views/base_api.py", line 119, in wraps
    duration, response = time_function(f, self, *args, **kwargs)
  File "/app/superset/utils/core.py", line 1364, in time_function
    response = func(*args, **kwargs)
  File "/app/superset/utils/log.py", line 303, in wrapper
    value = f(*args, **kwargs)
  File "/app/superset/views/base_api.py", line 91, in wraps
    return f(self, *args, **kwargs)
  File "/app/superset/databases/api.py", line 1215, in test_connection
    TestConnectionDatabaseCommand(item).run()
  File "/app/superset/commands/database/test_connection.py", line 231, in run
    engine=database.db_engine_spec.__name__,
  File "/app/superset/models/core.py", line 872, in db_engine_spec
    return self.get_db_engine_spec(url)
  File "/app/superset/models/core.py", line 881, in get_db_engine_spec
    driver = url.get_driver_name()
  File "/usr/local/lib/python3.10/site-packages/sqlalchemy/engine/url.py", line 625, in get_driver_name
    return self.get_dialect().driver
  File "/usr/local/lib/python3.10/site-packages/sqlalchemy/engine/url.py", line 680, in get_dialect
    entrypoint = self._get_entrypoint()
  File "/usr/local/lib/python3.10/site-packages/sqlalchemy/engine/url.py", line 662, in _get_entrypoint
    cls = registry.load(name)
  File "/usr/local/lib/python3.10/site-packages/sqlalchemy/util/langhelpers.py", line 330, in load
    return self.impls[name]()
  File "/usr/local/lib/python3.10/site-packages/importlib_metadata/__init__.py", line 184, in load
    module = import_module(match.group('module'))
  File "/usr/local/lib/python3.10/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 992, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 883, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/usr/local/lib/python3.10/site-packages/taos/__init__.py", line 2, in <module>
    from taos.connection import TaosConnection
  File "/usr/local/lib/python3.10/site-packages/taos/connection.py", line 4, in <module>
    from taos.cinterface import *
  File "/usr/local/lib/python3.10/site-packages/taos/cinterface.py", line 77, in <module>
    _libtaos = _load_taos()
  File "/usr/local/lib/python3.10/site-packages/taos/cinterface.py", line 74, in _load_taos
    raise InterfaceError("unable to load taos client library: %s" % err)
taos.error.InterfaceError: [0xffff]: unable to load taos client library: [0xffff]: unable to load taos client library: libtaos.so: cannot open shared object file: No such file or directory

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at superset/databases/api.py:test_connection and superset/commands/database/test_connection.py, then follow superset/models/core.py:get_db_engine_spec into SQLAlchemy driver loading. Reproduce with the listed versions and inspect taos/init.py and taos/cinterface.py, where libtaos.so fails to load. Done means the connection test handles this failure correctly, with the expected dependency requirement or a regression test documented.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, sqlalchemy
Domain
databases
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.