使用python与tdengine数据库,但获得绑定参数错误

发布于 2025-01-26 20:08:28 字数 1322 浏览 3 评论 0原文

将数据插入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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

归途 2025-02-02 20:08:29

我想您可能正在使用库中的旧版本TDENGINE运行,因此无法提供该功能接口。

I guess probably you are running an older version TDengine with the library doesn't provide that function interface.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文