Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python 3.11.7 import taos就报错 win环境 #248

Open
swortect opened this issue Apr 23, 2024 · 0 comments
Open

Python 3.11.7 import taos就报错 win环境 #248

swortect opened this issue Apr 23, 2024 · 0 comments

Comments

@swortect
Copy link

代码
conn = taos.connect(
host="127.0.0.1",
user="root",
password="taosdata",
port=6030,
)

db = "power"

conn.execute(f"DROP DATABASE IF EXISTS {db}")
conn.execute(f"CREATE DATABASE {db}")

change database. same as execute "USE db"

conn.select_db(db)

create super table

conn.execute(
"CREATE TABLE meters (ts TIMESTAMP, current FLOAT, voltage INT, phase FLOAT) TAGS (groupid INT, location BINARY(16))"
)

create table

conn.execute("CREATE TABLE d0 USING meters TAGS(0, 'Los Angles')")
conn.close()
exit()

报错

unable to load taos client library: Could not find module 'taos' (or one of its dependencies). Try using the full path with constructor syntax.
Traceback (most recent call last):
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-packages\taos\cinterface.py", line 51, in load_taos_windows
return ctypes.windll.LoadLibrary("taos")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\ctypes_init
.py", line 454, in LoadLibrary
return self.dlltype(name)
^^^^^^^^^^^^^^^^^^^
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\ctypes_init
.py", line 376, in init
self._handle = _dlopen(self._name, mode)
^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: Could not find module 'taos' (or one of its dependencies). Try using the full path with constructor syntax.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-packages\taos\cinterface.py", line 57, in load_taos_windows
ctypes.windll.LoadLibrary(find_library("taos"))
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\ctypes_init
.py", line 454, in LoadLibrary
return self._dlltype(name)
^^^^^^^^^^^^^^^^^^^
if '/' in name or '\' in name:
^^^^^^^^^^^
TypeError: argument of type 'NoneType' is not iterable

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-packages\taos\cinterface.py", line 72, in _load_taos
return load_funcpf
^^^^^^^^^^^^^^^
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-packages\taos\cinterface.py", line 59, in _load_taos_windows
raise InterfaceError("unable to load taos client library: %s" % final_err)
taos.error.InterfaceError: [0xffff]: unable to load taos client library: argument of type 'NoneType' is not iterable

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "", line 1, in
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-packages\taos_init_.py", line 2, in
from taos.connection import TaosConnection
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-packages\taos\connection.py", line 2, in
from taos.cinterface import *
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-packages\taos\cinterface.py", line 77, in
_libtaos = _load_taos()
^^^^^^^^^^^^
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\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: argument of type 'NoneType' is not iterable

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant