VanDyke Software Forums

VanDyke Software Forums (
-   Scripting (
-   -   Error in Cisco Save Running/Startup Config to Local File - line 301 (

stefanh 05-28-2021 09:22 AM

Error in Cisco Save Running/Startup Config to Local File - line 301
Tried using this script, to save running config.

But i get an error in line 301.

Any ideas? I speak network, not python :)


cboyack 05-28-2021 10:08 AM

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.

What version of SecureCRT are you using?

What is the OS upon which you're running SecureCRT?

stefanh 05-28-2021 02:43 PM

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 :)


Error: ascii
File: C:\users\blank\Documents\
Line: 301

LogLine("Session Path:{}".format(g_strSessionPath))

Windows server 2019 standard
SecureCRT 9.0.0 x64 build 2430

cboyack 05-28-2021 04:04 PM

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:



    LogLine("Session Name: {}".format(g_strSessionName))
    if g_strSessionName <> g_strSessionPath:
        LogLine("Session Path: {}".format(g_strSessionPath))



    LogLine("Session Name: {}".format(g_strSessionName))
    #if g_strSessionName != g_strSessionPath:
    #    LogLine("Session Path: {}".format(g_strSessionPath))

...and run the script again. Once you've run the script after the edit, what text is shared in the MessageBox?

stefanh 06-11-2021 01:33 PM

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.

All times are GMT -6. The time now is 03:06 AM.