来自netmiko connecthandler的device.send_command方法的问题

时间:2018-04-10 19:43:18

标签: python networking cisco

语言:python 2.7

模块:netmiko

方法:send_command

设备:IOS cisco_3750

协议:telnet

问题描述:发送任何包含四个以上字符串的命令时,会出现I / O错误

error:
 example device.send_command(show aaa user all)
Traceback (most recent call last):
  File "C:\Users\Lenovo-L460\Desktop\yo.py", line 11, in <module>
    output=lala.send_command("show aaa user all")
  File "C:\Python27\lib\site-packages\netmiko\base_connection.py", line 1051, in send_command
    search_pattern))
IOError: Search pattern never detected in send_command_expect: testingnew\#

请注意 testingnew 是启用模式下设备的主机名 脚本工作正常,发送两个字符串示例device.send_command(show?)工作正常

1 个答案:

答案 0 :(得分:0)

谢谢Kirk Byers,我收集了跟踪的痕迹,因为终端长度发生了问题,第一页数据在那里跟踪终端期待输入查看下一页,我修复了终端长度和问题是排序