You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
stmt = c_void_p(2809582648032)
def taos_stmt_execute(stmt):
# type: (ctypes.c_void_p) -> None
"""Execute a statement query
@stmt: TAOS_STMT*
"""
res = _libtaos.taos_stmt_execute(stmt)
if res != 0:
> raise StatementError(msg=taos_stmt_errstr(stmt), errno=res)
E taos.error.StatementError: [0x060b]: Timestamp data out of range
Traceback (most recent call last):
File "E:\projects\python\py-wi-water-model-edge\venv\lib\site-packages\taos\bind.py", line 428, in timestamp
buffer = cast(values, c_void_p)
File "C:\Python310\lib\ctypes\__init__.py", line 510, in cast
return _cast(obj, obj, typ)
ctypes.ArgumentError: argument 1: <class 'TypeError'>: wrong type
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "E:\projects\python\py-wi-water-model-edge\py_wi_water_model_edge\ts\tdengine_write_test.py", line 34, in <module>
params[0].timestamp(time_list)
File "E:\projects\python\py-wi-water-model-edge\venv\lib\site-packages\taos\bind.py", line 431, in timestamp
buffer = buffer_type(*[_datetime_to_timestamp(value, precision) for value in values])
File "E:\projects\python\py-wi-water-model-edge\venv\lib\site-packages\taos\bind.py", line 431, in <listcomp>
buffer = buffer_type(*[_datetime_to_timestamp(value, precision) for value in values])
File "E:\projects\python\py-wi-water-model-edge\venv\lib\site-packages\taos\bind.py", line 215, in _datetime_to_timestamp
return int(round((value - _datetime_epoch).total_seconds() * 1000))
TypeError: can't subtract offset-naive and offset-aware datetimes
Exception ignored in: <function TaosConnection.__del__ at 0x000002C9AEB44280>
Traceback (most recent call last):
File "E:\projects\python\py-wi-water-model-edge\venv\lib\site-packages\taos\connection.py", line 341, in __del__
File "E:\projects\python\py-wi-water-model-edge\venv\lib\site-packages\taos\connection.py", line 62, in close
TypeError: 'NoneType' object is not callable
The text was updated successfully, but these errors were encountered:
如果设计如此可不可以完善文档说明这些问题?
比如这样一个用例
会报错
Timestamp data out of range
所有的bind都不支持直接传入numpy的array,这点不太方便
如果我传入一个List[datetime]但带时区的,绑定timestamp也会报错
error:
The text was updated successfully, but these errors were encountered: