-
Notifications
You must be signed in to change notification settings - Fork 17
Open
Description
- TDengine Version [3.3.6.9]
greenlet 3.2.4
pip 25.1
setuptools 78.1.1
SQLAlchemy 2.0.43
taos-ws-py 0.6.1
typing_extensions 4.14.1
wheel 0.45.1
from sqlalchemy import create_engine, text
import taosws
engine = create_engine('taosws://root:taosdata@localhost:6041/test')
try:
with engine.connect() as conn:
# 测试连接
result = conn.execute(text("SELECT 1"))
print("连接成功!")
print(result.fetchall())
except Exception as e:
print(f"连接失败: {e}")
Traceback (most recent call last):
File "D:\lisiner\lisiner_td_to_maxcomputer\td_to_maxcomputer_local\test.py", line 6, in <module>
engine = create_engine('taosws://root:taosdata@localhost:6041/test')
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "<string>", line 2, in create_engine
File "C:\Users\linta\.conda\envs\td_to_maxcomputer\Lib\site-packages\sqlalchemy\util\deprecations.py", line 281, in warned
return fn(*args, **kwargs) # type: ignore[no-any-return]
^^^^^^^^^^^^^^^^^^^
File "C:\Users\linta\.conda\envs\td_to_maxcomputer\Lib\site-packages\sqlalchemy\engine\create.py", line 568, in create_engine
entrypoint = u._get_entrypoint()
^^^^^^^^^^^^^^^^^^^
File "C:\Users\linta\.conda\envs\td_to_maxcomputer\Lib\site-packages\sqlalchemy\engine\url.py", line 772, in _get_entrypoint
cls = registry.load(name)
^^^^^^^^^^^^^^^^^^^
File "C:\Users\linta\.conda\envs\td_to_maxcomputer\Lib\site-packages\sqlalchemy\util\langhelpers.py", line 453, in load
raise exc.NoSuchModuleError(
sqlalchemy.exc.NoSuchModuleError: Can't load plugin: sqlalchemy.dialects:taosws
### 这个问题是什么原因导致的呢?我安装的版本应该没有问题,
我是不是需要同时安装taos-ws-py和taospy,然后还要安装安装客户端驱动 taosc
才可以使用这个连接池吗?
可是我不是仅仅只用了import taosws,我没有使用原生的接口啊
sqlalchemy.exc.NoSuchModuleError: Can't load plugin: sqlalchemy.dialects:taosws
这个为什么无法找到插件呢?
Metadata
Metadata
Assignees
Labels
No labels