netmiko: Unable to find prompt error on HP ProCurve 2510, 2610, and 2810 switches

I’ve verified login information by manually SSHing to the switch and running this exact code on other model of switches without error. Here’s the exact traceback I get:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Python27\lib\site-packages\netmiko\ssh_dispatcher.py", line 96, in ConnectHandler
    return ConnectionClass(*args, **kwargs)
  File "C:\Python27\lib\site-packages\netmiko\base_connection.py", line 90, in __init__
    self.session_preparation()
  File "C:\Python27\lib\site-packages\netmiko\hp\hp_procurve_ssh.py", line 23, in session_preparation
    self.set_base_prompt()
  File "C:\Python27\lib\site-packages\netmiko\base_connection.py", line 504, in set_base_prompt
    prompt = self.find_prompt(delay_factor=delay_factor)
  File "C:\Python27\lib\site-packages\netmiko\base_connection.py", line 549, in find_prompt
    raise ValueError("Unable to find prompt: {}".format(prompt))
ValueError: Unable to find prompt:

And here’s my code:

from netmiko import ConnectHandler
net_connect = ConnectHandler(device_type='hp_procurve', ip='172.16.1.220', username='manager', password='password')
net_connect.send_command("copy run tftp 172.16.1.1 SwitchBackups\\Hershey\\HPS-LIB-HP2810A.txt")
net_connect.disconnect()

Login prompt looks identical to other models of switches so not sure what could be tripping up netmiko here.

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Comments: 20 (11 by maintainers)

Most upvoted comments

Thanks Kirk. This library is very useful for us and I appreciate the work you put into it.

That did the trick! One interesting thing to note is that a global_delay_factor of 2 worked in a Python script, but I had to bump it up to 6 after compiling it to an exe with PyInstaller for it to work. Also, 2626 models were affected by this issue as well I found.

Thanks for all the help! Everything appears to be working for me now. Even have these configs setup to push to a git repo weekly so we can do version controlling. Very helpful solution this module made possible.