Robotframework 通过telnet库连接Robot框架时出错

Robotframework 通过telnet库连接Robot框架时出错,robotframework,Robotframework,正在尝试通过telnet连接到我的远程主机。Telnet客户端已启用并正在运行,我收到以下错误: TypeError: __init__() got an unexpected keyword argument 'encodings' 在下面找到我的机器人代码: *** Settings *** Library Process Library Telnet terminal_emulation=YES telnetlib_log_level=DEBUG *** Test

正在尝试通过telnet连接到我的远程主机。Telnet客户端已启用并正在运行,我收到以下错误:

TypeError: __init__() got an unexpected keyword argument 'encodings'
在下面找到我的机器人代码:

*** Settings ***
Library  Process
Library  Telnet     terminal_emulation=YES      telnetlib_log_level=DEBUG

*** Test Cases ***

Try Telnet
    Open Connection     10.99.1.123     port=22   

我是不是漏掉了什么明显的东西?错误并不能说明什么。

您有最新版本的pyte(pip列表)吗?似乎0.6.0版中引入的更改破坏了与Telnet lib的兼容性。 如果是,请卸载pyte,安装pyte版本0.5.2

pip uninstall pyte
pip install pyte==0.5.2

您可以在

查看发行说明,这是您的测试用例的工作示例吗?至少缺少***个测试用例***部分。只是草率地复制了示例。在Telnet库的import部分或openconnection关键字参数中包含terminal_仿真时,我总是遇到同样的问题。如果不需要使用terminal_仿真(值应设置为True或False,因为这是bool参数),只需跳过它。正如Telnet libdoc和Telnet.py源代码中所述,此文档示例返回错误:| Library | Telnet | terminal | u emulation=True | terminal | u type=vt100 | window | u size=400x100 |错误是从以下位置抛出的:Python27/Lib/site packages/pyte/streams.py,class ByteStream,第383行super(ByteStream,self)。|init||||init124它在第138行调用父类流