Conflict between Paramiko SSHclient?
还没有人认领这个 Issue。
评估
调研方向
使用顶层 Paramiko 代码和函数封装变体,通过 examples/ingest_dataframe_default_tags.py 重现该问题。然后检查 influxdb_client/_sync/api_client.py 中 ApiClient.del 和 _signout 附近的代码;当顶层变体退出时不再出现报告的 NoneType TypeError,即表示完成。
由索引模型根据 Issue 内容生成。
描述
Specifications
- Client Version: 1.35.0
- InfluxDB Version: 2.6.0
- Platform: Windows & Linux
- Paramiko: 2.12.0
Code sample to reproduce problem
#### added to example ingest_dataframe_default_tags.py
from paramiko.client import SSHClient, AutoAddPolicy
with SSHClient() as sshclient:
sshclient.set_missing_host_key_policy(AutoAddPolicy)
sshclient.connect(hostname="192.168.0.1",username="XXXXX",password="XXXXX")
## some code to transfer files
#### added to example ingest_dataframe_default_tags.py
Expected behavior
No errors
Actual behavior
Program ends with:
=== results ===
vix-daily: Open 17.96, Close 18.22, High 18.68, Low 17.54
vix-daily: Open 18.45, Close 17.49, High 18.49, Low 17.44
vix-daily: Open 17.66, Close 16.73, High 17.67, Low 16.19
vix-daily: Open 16.72, Close 15.5, High 16.75, Low 15.5
vix-daily: Open 15.42, Close 15.61, High 15.68, Low 15.32
vix-daily: Open 16.15, Close 16.75, High 16.88, Low 15.57
vix-daily: Open 17.32, Close 16.82, High 17.46, Low 16.79
vix-daily: Open 16.6, Close 18.04, High 18.33, Low 16.53
vix-daily: Open 17.29, Close 16.75, High 17.3, Low 16.4
vix-daily: Open 17.07, Close 15.56, High 17.31, Low 15.49
Exception ignored in: <function ApiClient.__del__ at 0x000001C19BC9CC10>
Traceback (most recent call last):
File "C:\Users\bobla\AppData\Local\Programs\Python\Python310\lib\site-packages\influxdb_client\_sync\api_client.py", line 84, in __del__
File "C:\Users\bobla\AppData\Local\Programs\Python\Python310\lib\site-packages\influxdb_client\_sync\api_client.py", line 661, in _signout
TypeError: 'NoneType' object is not callable
This does not affect the execution itself. From what I could gather, the _signout is called an extra time at the end of the program.
Additional info
I was able to solve the error by moving the code in a function
#### added to example ingest_dataframe_default_tags.py
from paramiko.client import SSHClient, AutoAddPolicy
def transferRouterFiles():
from paramiko.client import SSHClient, AutoAddPolicy
with SSHClient() as sshclient:
sshclient.set_missing_host_key_policy(AutoAddPolicy)
sshclient.connect(hostname="192.168.0.1",username="XXXXX",password="XXXXX")
## some code to transfer files
transferRouterFiles()
#### added to example ingest_dataframe_default_tags.py
- 主要语言
- Python
- 星标
- 792
- 派生
- 186
- 平均合并
- 3 小时 2 分钟
- 30 天内合并 PR
- 1
环境准备
我们还没有检查这个项目的环境配置文件。先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
influxdata/influxdb-client-python 的其他 Issue
-
bug
难度 2/5 1-3 小时 新手友好度 68/100
influxdata/influxdb-client-python#613 · 7 条评论 ·
-
bug
难度 3/5 1-2 天 新手友好度 65/100
-
难度 3/5 1-2 天 新手友好度 45/100
influxdata/influxdb-client-python#694 · 6 个 reaction ·
-
bug
难度 3/5 1-2 天 新手友好度 30/100
influxdata/influxdb-client-python#693 · 2 条评论 · 1 个 reaction ·
-
难度 4/5 3-5 天 新手友好度 35/100
查看 influxdata/influxdb-client-python 的全部 Issue
相似的 Issue
-
bug
难度 2/5 1-3 小时 新手友好度 85/100
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 90/100
维护者通常 1 天内回复
-
instance instance add
难度 2/5 1-3 小时 新手友好度 68/100
searxng/searx-instances#941 · 1 条评论 ·
-
难度 1/5 1 小时以内 新手友好度 92/100
FluidNumerics/fluid-walk-blocker#89 ·
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 84/100
维护者通常 1 天内回复