使用python与tdengine数据库,但获得绑定参数错误
将数据插入TDENGINE数据库非常简单,但仍然存在错误。
使用conn.statement(“插入信息cache_record values(?,??,,?,?,?,?,?,?,?,,?)”))
输出:
Traceback (most recent call last):
File "/home/ehigh/work/PythonWorker/Worker/HGSocialSecurity/main.py", line 8, in <module>
curd.bind_insert([
File "/home/ehigh/work/PythonWorker/Worker/HGSocialSecurity/curd/cache_table.py", line 15, in bind_insert
stmt = conn.statement("insert info cache_record values(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)")
File "/home/ehigh/.local/lib/python3.9/site-packages/taos/connection.py", line 103, in statement
taos_stmt_prepare(stmt, sql)
File "/home/ehigh/.local/lib/python3.9/site-packages/taos/cinterface.py", line 626, in taos_stmt_prepare
raise StatementError(msg=taos_stmt_errstr(stmt), errno=res)
File "/home/ehigh/.local/lib/python3.9/site-packages/taos/cinterface.py", line 656, in taos_stmt_errstr
err = c_char_p(_libtaos.taos_stmt_errstr(stmt))
File "/usr/local/python3/lib/python3.9/ctypes/__init__.py", line 387, in __getattr__
func = self.__getitem__(name)
File "/usr/local/python3/lib/python3.9/ctypes/__init__.py", line 392, in __getitem__
func = self._FuncPtr((name_or_ordinal, self))
AttributeError: /lib/libtaos.so: undefined symbol: taos_stmt_errstr
有什么想法吗?
It's quite simple to insert data into TDengine database but still got errors.
use conn.statement("insert info cache_record values(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)")
The output:
Traceback (most recent call last):
File "/home/ehigh/work/PythonWorker/Worker/HGSocialSecurity/main.py", line 8, in <module>
curd.bind_insert([
File "/home/ehigh/work/PythonWorker/Worker/HGSocialSecurity/curd/cache_table.py", line 15, in bind_insert
stmt = conn.statement("insert info cache_record values(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)")
File "/home/ehigh/.local/lib/python3.9/site-packages/taos/connection.py", line 103, in statement
taos_stmt_prepare(stmt, sql)
File "/home/ehigh/.local/lib/python3.9/site-packages/taos/cinterface.py", line 626, in taos_stmt_prepare
raise StatementError(msg=taos_stmt_errstr(stmt), errno=res)
File "/home/ehigh/.local/lib/python3.9/site-packages/taos/cinterface.py", line 656, in taos_stmt_errstr
err = c_char_p(_libtaos.taos_stmt_errstr(stmt))
File "/usr/local/python3/lib/python3.9/ctypes/__init__.py", line 387, in __getattr__
func = self.__getitem__(name)
File "/usr/local/python3/lib/python3.9/ctypes/__init__.py", line 392, in __getitem__
func = self._FuncPtr((name_or_ordinal, self))
AttributeError: /lib/libtaos.so: undefined symbol: taos_stmt_errstr
any idea?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我想您可能正在使用库中的旧版本TDENGINE运行,因此无法提供该功能接口。
I guess probably you are running an older version TDengine with the library doesn't provide that function interface.