|
![]() |
|
Thread Tools | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
Error in Cisco Save Running/Startup Config to Local File - line 301
Tried using this script, to save running config.
https://forums.vandyke.com/showthread.php?p=35881 But i get an error in line 301. Any ideas? I speak network, not python ![]() Stefan |
#2
|
|||
|
|||
Hi stefanh,
What is the *exact* error that you're seeing? If you want to post an image of it instead of writing it out, please see this post. Also: What version of SecureCRT are you using?
__________________
Thanks, --Cameron VanDyke Software Technical Support support@vandyke.com (505) 332-5730 |
#3
|
|||
|
|||
Yeah I wish I could attach a file, but no "Attach Files" option under "Additional Options". Btw, its 2021, it could be a lot easier to attach screenshots
![]() UnicoreEncodeError Error: ascii File: C:\users\blank\Documents\Cisco-SaveDeviceConfigToFile.py Line: 301 LogLine("Session Path:{}".format(g_strSessionPath)) Windows server 2019 standard SecureCRT 9.0.0 x64 build 2430 |
#4
|
|||
|
|||
I'd like you to make a modification to the script so that we can get a better idea as to the error that you're seeing. Please modify the script thusly:
From: Code:
LogLine("Session Name: {}".format(g_strSessionName)) if g_strSessionName <> g_strSessionPath: LogLine("Session Path: {}".format(g_strSessionPath)) Code:
LogLine("Session Name: {}".format(g_strSessionName)) crt.Dialog.MessageBox(g_strSessionPath) #if g_strSessionName != g_strSessionPath: # LogLine("Session Path: {}".format(g_strSessionPath))
__________________
Thanks, --Cameron VanDyke Software Technical Support support@vandyke.com (505) 332-5730 |
#5
|
|||
|
|||
When trying your new code, and reproducing the error, it works for some reason both with the "new" code, and the old.
Not sure what was done differently this time, its been two weeks since I last tried. All i can think of is some sort of path issue. |
![]() |
Thread Tools | |
Display Modes | Rate This Thread |
|
|