apache / apache/iotdb

iotdb在python无法运行

未关闭
#11,048 2 条评论 1 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
Java
星标
6.4k
派生
1.2k
平均合并
1 天 23 小时
30 天内合并 PR
115

描述

### Search before asking

- [X] I searched in the [issues](https://github.com/apache/iotdb/issues) and found nothing similar.

### Version

python=3.11.5,apache-iotdb=1.1.2,thrift=0.16.0环境中,iotdb用不了,无法运行,连都连不了

### Describe the bug and provide the minimal reproduce step

session closed because:
Traceback (most recent call last):
File "D:\my_softs\anaconda\envs\kmsnMy\Lib\site-packages\iotdb\Session.py", line 130, in open
open_resp = self.__client.openSession(open_req)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\my_softs\anaconda\envs\kmsnMy\Lib\site-packages\iotdb\thrift\rpc\IClientRPCService.py", line 722, in openSession
return self.recv_openSession()
^^^^^^^^^^^^^^^^^^^^^^^
File "D:\my_softs\anaconda\envs\kmsnMy\Lib\site-packages\iotdb\thrift\rpc\IClientRPCService.py", line 739, in recv_openSession
raise x
thrift.Thrift.TApplicationException: Internal error processing openSession
Traceback (most recent call last):
File "D:\my_softs\anaconda\envs\kmsnMy\Lib\site-packages\iotdb\Session.py", line 1027, in set_time_zone
status = self.__client.setTimeZone(request)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\my_softs\anaconda\envs\kmsnMy\Lib\site-packages\iotdb\thrift\rpc\IClientRPCService.py", line 1073, in setTimeZone
self.send_setTimeZone(req)
File "D:\my_softs\anaconda\envs\kmsnMy\Lib\site-packages\iotdb\thrift\rpc\IClientRPCService.py", line 1082, in send_setTimeZone
self._oprot.trans.flush()
File "D:\my_softs\anaconda\envs\kmsnMy\Lib\site-packages\thrift\transport\TTransport.py", line 304, in flush
self.__trans.write(buf)
File "D:\my_softs\anaconda\envs\kmsnMy\Lib\site-packages\thrift\transport\TSocket.py", line 172, in write
raise TTransportException(type=TTransportException.NOT_OPEN,
thrift.transport.TTransport.TTransportException: Transport not open

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "D:\my_projects\kmsnPython\code\myTest.py", line 14, in
session.open(False)
File "D:\my_softs\anaconda\envs\kmsnMy\Lib\site-packages\iotdb\Session.py", line 150, in open
self.set_time_zone(self.__zone_id)
File "D:\my_softs\anaconda\envs\kmsnMy\Lib\site-packages\iotdb\Session.py", line 1034, in set_time_zone
raise RuntimeError("Could not set time zone because: ", e)
RuntimeError: ('Could not set time zone because: ', TTransportException('Transport not open'))

Process finished with exit code 1

### What did you expect to see?

1

### What did you see instead?

1

### Anything else?

_No response_

### Are you willing to submit a PR?

- [X] I'm willing to submit a PR!

贡献指南

打开贡献指南

调研方向

使用 Python 3.11.5、apache-iotdb 1.1.2 和 thrift 0.16.0 重现连接失败,然后检查 iotdb/Session.py 中 open 和 set_time_zone 附近的代码,以及生成的 thrift 客户端调用。比较 openSession 所涉及的服务器和客户端设置;当原因得到确认且兼容的连接不再以 transport-not-open 错误结束时,即表示完成。

由索引模型根据 Issue 内容生成。

评估

技术栈
python
领域
databases
Issue 类型
缺陷
难度
4/5
预计耗时
3-5 天
活跃度
停滞
描述清晰度
需要澄清
新手友好度
25/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。