taosdata / taos-connector-python

TDengine connector for Python
https://www.taosdata.com/cn/documentation/connector#python
MIT License
48 stars 14 forks source link

C function taos_schemaless_insert is not supported in v2.2.2.0 #11

Closed occoder closed 2 years ago

occoder commented 2 years ago

Environment Linux dev-desktop 5.11.0-37-generic #41~20.04.2-Ubuntu SMP Fri Sep 24 09:06:38 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux Run python3 insert-lines.py Got following error prompt

['st,t1=3i64,t2=4f64,t3="t3" c1=3i64,c3=L"pass",c2=false,c4=4f64 1626006833639000000'] 1 0
Traceback (most recent call last):
  File "insert-lines.py", line 13, in <module>
    conn.schemaless_insert(lines, taos.SmlProtocol.LINE_PROTOCOL, taos.SmlPrecision.NOT_CONFIGURED)
  File "/home/dev/.local/lib/python3.8/site-packages/taos/connection.py", line 174, in schemaless_insert
    return taos_schemaless_insert(self._conn, lines, protocol, precision)
  File "/home/dev/.local/lib/python3.8/site-packages/taos/cinterface.py", line 842, in taos_schemaless_insert
    _check_if_supported()
  File "/home/dev/.local/lib/python3.8/site-packages/taos/cinterface.py", line 862, in _check_if_supported
    raise InterfaceError("C function %s is not supported in v%s: %s" % (func, taos_get_client_info(), _UNSUPPORTED[func]))
taos.error.InterfaceError: [0xffff]: C function taos_schemaless_insert is not supported in v2.2.2.0: /lib/libtaos.so: undefined symbol: taos_schemaless_insert
zitsen commented 2 years ago

If you want to use schemaless insert feature, you should use 2.3.x currently (and it will be published as stable 2.4.x soon.)