I got the same error importing taos.
I changed to taosws and it looks good.
Mainly, I was running this code taken from: https://github.com/taosdata/taos-connector-python#execute-many
import taos
conn = taos.connect()
cursor = conn.cursor()
db_name = "test_db"
cursor.execute(f"DROP DATABASE IF EXISTS {db_name}")
cursor.execute(f"CREATE DATABASE {db_name}")
cursor.execute(f"USE {db_name}")
cursor.execute("create stable stb (ts timestamp, v1 int) tags(t1 int)")
create_table_data = [
{
"name": "tb1",
"t1": 1,
},
{
"name": "tb2",
"t1": 2,
},
{
"name": "tb3",
"t1": 3,
}
]
cursor.execute_many(
"create table {name} using stb tags({t1})",
create_table_data,
)
cursor.execute("show databases")
results = cursor.fetchall()
for row in results:
print(row)
I changed taos into taosws (line 1 and line 3) and all seems to be correctly functioning.