question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ValueError Router prompt not found

See original GitHub issue

Below is my script, I was testing to see if automating will work.

from netmiko import ConnectHandler

def switch_helper(): switch = { 'device_type': 'aruba_os', 'ip': 'ip', 'username':'username', 'password':'password',
}

to_connect = ConnectHandler(**switch)
output = to_connect.send_command('show ip')
print(output)

if __name__ == ``'__main__':

switch_helper()

The error

Traceback (most recent call last): File “C:/Users/a/Documents/Assist/Switch_Networking/autom.py”, line 42, in <module> switch_helper() File “C:/Users/a/Documents/Assist/Switch_Networking/autom.py”, line 35, in switch_helper to_connect = ConnectHandler(**switch) File “C:\Users\a\AppData\Local\Programs\Python\Python36-32\lib\site-packages\netmiko\ssh_dispatcher.py”, line 168, in ConnectHandler return ConnectionClass(*args, **kwargs) File “C:\Users\a\AppData\Local\Programs\Python\Python36-32\lib\site-packages\netmiko\base_connection.py”, line 188, in init self.session_preparation() File “C:\Users\a\AppData\Local\Programs\Python\Python36-32\lib\site-packages\netmiko\aruba\aruba_ssh.py”, line 15, in session_preparation self.set_base_prompt() File “C:\Users\a\AppData\Local\Programs\Python\Python36-32\lib\site-packages\netmiko\base_connection.py”, line 786, in set_base_prompt raise ValueError(“Router prompt not found: {0}”.format(repr(prompt))) ValueError: Router prompt not found: ‘\x1b[1;24r\x1b[24;1H\x1b[24;1H\x1b[2K\x1b[24;1H\x1b[?25h\x1b[24;1H\x1b[24;1HTee Switch2920# \x1b[24;1H\x1b[24;17H\x1b[24;1H\x1b[?25h\x1b[24;17H’

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
MorenoBanditocommented, Jan 19, 2018

WORKED!!!

0reactions
ranjeetjangracommented, May 23, 2020

Hi @ktbyers I am getting below error for doing ssh in Cisco UCCX device , which device type shall i use . ValueError: Router prompt not found: ‘admin:’

Presently i am using device_type’:‘cisco_ios’

Regards Ranjeet

Read more comments on GitHub >

github_iconTop Results From Across the Web

netmiko error after connection established: Router prompt not ...
Using python3.7 and netmiko 3.4.0. I'm trying to connect to a Linux Ubuntu 18 server. I see that Netmiko can ssh login, but...
Read more >
Salt Proxy and Netmiko for EdgeOS - Ubiquiti Community
raise ValueError("Router prompt not found: {0}".format(repr(prompt))). Netmiko version 2.3.3, Salt 2019.2. Responses (3). Sort by. Newest Oldest. Page.
Read more >
netmiko.base_connection API documentation - GitHub Pages
Module netmiko.base_connection. Base connection class for netmiko. Handles SSH connection and methods that are generically applicable to different platforms ...
Read more >
How to use the netmiko.log.debug function in netmiko - Snyk
Use Snyk Code to scan source code in minutes - no build needed - and fix issues ... raise ValueError("Router prompt not found:...
Read more >
python/7138/netmiko/netmiko/base_connection.py
if not prompt[ - 1 ] in (pri_prompt_terminator, alt_prompt_terminator):. raise ValueError( "Router prompt not found: {0}" . format (prompt)).
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found