Skip to content

Conversation

ktbyers
Copy link
Owner

@ktbyers ktbyers commented Jul 21, 2025

Fixes: #3704

@ktbyers
Copy link
Owner Author

ktbyers commented Jul 21, 2025

nc = ConnectHandler(**device)
print(nc.find_prompt())
nc.enable()
print(nc.find_prompt())
Testing with fix present:
$ python test1.py 
AS>
AS#
Testing without fix (current code)
$ python test1.py 
AS>
Traceback (most recent call last):
  File "/home/kbyers/EP/test1.py", line 12, in <module>
    nc.enable()
  File "/home/kbyers/VENV/py3_venv/lib/python3.11/site-packages/netmiko/cisco_base_connection.py", line 27, in enable
    return super().enable(
           ^^^^^^^^^^^^^^^
  File "/home/kbyers/VENV/py3_venv/lib/python3.11/site-packages/netmiko/base_connection.py", line 2062, in enable
    raise ValueError(msg)
ValueError: Failed to enter enable mode. Please ensure you pass the 'secret' argument to ConnectHandler.

@ktbyers ktbyers merged commit 7d01387 into develop Jul 21, 2025
34 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Enable() fails on switch with particular name

1 participant