- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-17-2024 05:23 AM
i got following error
Checking for VIOS-ADVENTERPRISEK9-M
Software version found: VIOS-ADVENTERPRISEK9-M
Running VIOS-ADVENTERPRISEK9-M commands
Traceback (most recent call last):
File "netmiko6.py", line 74, in <module>
output = net_connect.send_config_set(commands_list_router)
File "/usr/local/lib/python3.8/dist-packages/netmiko/base_connection.py", line 111, in wrapper_decorator
return_val = func(self, *args, **kwargs)
File "/usr/local/lib/python3.8/dist-packages/netmiko/base_connection.py", line 2325, in send_config_set
output += self.read_until_pattern(
File "/usr/local/lib/python3.8/dist-packages/netmiko/base_connection.py", line 748, in read_until_pattern
raise ReadTimeout(msg)
netmiko.exceptions.ReadTimeout:
Pattern not detected: '(?:R1.*$|#.*$)' in output.
Solved! Go to Solution.
- Labels:
-
Other Networking Topics
Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-17-2024 05:28 AM
Hey @LegiaP8741 from the error you encountering is a 'ReadTimeout' exception, which is raised by Netmiko when it doesn't detect a specific pattern in the output within a certain time period. You see the pattern is (?:R1.*$|#.*$), which is a regular expression (I had to decode that!) that matches either the string "R1" followed by any characters until the end of the line, or a "#" character followed by any characters until the end of the line.
net_connect = ConnectHandler(**device)
net_connect.timeout = 60 # increase timeout to 60 seconds
Try this. Hope it helps. If you want, share your full code if the above does not work.
Connect with me https://bigevilbeard.github.io
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-17-2024 06:24 AM - edited 07-17-2024 07:54 AM
what is line 74, in <module> ? output = net_connect.send_config_set(commands_list_router)
I meant what is in command list ? what type of commands, etc?
take a look at ur commands_list_file and remove any notes, markings, remarks in ur command list file; Any inconclusive IOS commands; Add "!" between lines of commands if ur list is too long; also add time out 60 s mentioned above.
Regards, ML
**Please Rate All Helpful Responses **

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-17-2024 05:28 AM
Hey @LegiaP8741 from the error you encountering is a 'ReadTimeout' exception, which is raised by Netmiko when it doesn't detect a specific pattern in the output within a certain time period. You see the pattern is (?:R1.*$|#.*$), which is a regular expression (I had to decode that!) that matches either the string "R1" followed by any characters until the end of the line, or a "#" character followed by any characters until the end of the line.
net_connect = ConnectHandler(**device)
net_connect.timeout = 60 # increase timeout to 60 seconds
Try this. Hope it helps. If you want, share your full code if the above does not work.
Connect with me https://bigevilbeard.github.io
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-17-2024 06:24 AM - edited 07-17-2024 07:54 AM
what is line 74, in <module> ? output = net_connect.send_config_set(commands_list_router)
I meant what is in command list ? what type of commands, etc?
take a look at ur commands_list_file and remove any notes, markings, remarks in ur command list file; Any inconclusive IOS commands; Add "!" between lines of commands if ur list is too long; also add time out 60 s mentioned above.
Regards, ML
**Please Rate All Helpful Responses **
