Closed seyedfazil900 closed 1 year ago
^ % Invalid input detected at '^' marker.
Getting above error
@seyedfazil900 You should probably look at the Netmiko session_log and look at more details regarding what is happening:
EXTREME = {
"device_type": "extreme_vsp",
"ip": "192.168.1.1",
"username": input("Enter the password:"),
"password": input("Enter the password:"),
"session_log": "my_output.txt", # Will create a file named "my_output.txt" with details about the session.
}
I have tried and found the problem. But not able to save the output as a .txt file. In the seesion log the running config reach upto line 1300 and breaks and futher not able to fethc the running configution.
from netmiko import ConnectHandler
EXTREME = { "device_type": "extreme_vsp", "ip": "172.165.89.32", "username": "sfazil.isl", "password": input("Enter the password:"), "session_log": "my_output.txt" }
ssh_connect = ConnectHandler(**EXTREME) ssh_connect.enable() output = ssh_connect.send_command("show running-config") print(output)
file_location = "D:\AVAYA IMAGE\BACKUP\backup" open_device = open(file_location + ".txt", "w") open_device.write(output)
Traceback (most recent call last):
File "C:\Users\freeza\Desktop\PYTHON CODE\back2.py", line 14, in
Hmmm, do you have non-ascii characters in your show running-config
?
So did you find the original problem or is this still broken?
It has only ASCII. It is is breaking not able to see the full out running config i
I am going to close this issue as it is old/stale. If anyone is still working on this, feel free to re-open it.
from netmiko import ConnectHandler
EXTREME = { "device_type": "extreme_vsp", "ip": "192.168.1.1", "username": input("Enter the password:") "password": input("Enter the password:") }
ssh_connect = ConnectHandler(**EXTREME) output = ssh_connect.send_command("show ip int bri") print(output)