You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@iotdb.apache.org by "changxue (Jira)" <ji...@apache.org> on 2023/01/06 02:10:00 UTC
[jira] [Commented] (IOTDB-5236) DeleteData Python API cannot work
[ https://issues.apache.org/jira/browse/IOTDB-5236?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17655208#comment-17655208 ]
changxue commented on IOTDB-5236:
---------------------------------
verified:
session.delete_data(paths_list, timestamp) OK
session.delete_data_in_range(paths_list, start,end) OK
session.delete_data_in_range(paths_list, timestamp) error:missing 1 required positional argument: 'end_time'
> DeleteData Python API cannot work
> ---------------------------------
>
> Key: IOTDB-5236
> URL: https://issues.apache.org/jira/browse/IOTDB-5236
> Project: Apache IoTDB
> Issue Type: Bug
> Affects Versions: 0.13.2, 1.0.0
> Reporter: Haonan Hou
> Assignee: Haonan Hou
> Priority: Major
> Labels: pull-request-available
> Fix For: 0.13.3, 1.0.1
>
>
> self = <iotdb.Session.Session object at 0x000001B30F5EB2B0>
> paths_list = ['root.sg2.d1.s1', 'root.sg2.d1.s2', 'root.sg2.d1.s3']
> timestamp = 1
> def delete_data(self, paths_list, timestamp):
> """
> delete all data <= time in multiple time series
> :param paths_list: time series list that the data in.
> :param timestamp: data with time stamp less than or equal to time will be deleted.
> """
> request = TSDeleteDataReq(self.__session_id, paths_list, timestamp)
> try:
> > status = self.__client.deleteData(request)
> ..\..\iotdb-sdk-test\venv\lib\site-packages\iotdb\Session.py:350:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> self = <iotdb.thrift.rpc.TSIService.Client object at 0x000001B31F2EA2E0>
> req = TSDeleteDataReq(sessionId=11, paths=['root.sg2.d1.s1', 'root.sg2.d1.s2', 'root.sg2.d1.s3'], startTime=1, endTime=None)
> def deleteData(self, req):
> """
> Parameters:
> - req
>
> """
> self.send_deleteData(req)
> > return self.recv_deleteData()
> ..\..\iotdb-sdk-test\venv\lib\site-packages\iotdb\thrift\rpc\TSIService.py:1549:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> self = <iotdb.thrift.rpc.TSIService.Client object at 0x000001B31F2EA2E0>
> def recv_deleteData(self):
> iprot = self._iprot
> (fname, mtype, rseqid) = iprot.readMessageBegin()
> if mtype == TMessageType.EXCEPTION:
> x = TApplicationException()
> x.read(iprot)
> iprot.readMessageEnd()
> > raise x
> E thrift.Thrift.TApplicationException: Required field 'endTime' was not found in serialized data! Struct: org.apache.iotdb.service.rpc.thrift.TSDeleteDataReq$TSDeleteDataReqStandardScheme@75987fe6
>
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)