jamiecaesar / securecrt-tools

SecureCRT scripts, written in Python, for doing various tasks when connected to Cisco equipment.
Apache License 2.0
246 stars 78 forks source link

Script error - Attribute Error #45

Closed GabeSynthesis81 closed 5 years ago

GabeSynthesis81 commented 5 years ago

Hi!

Thank you for such amazing and handy scripts. I recently had to reinstall securecrt and your scripts, and now I can't seem to run them without getting this error...

image

The debug is not much help to me either....

Starting Logging. Running Python version: 2.7.9 (default, May 26 2016, 11:15:27) [MSC v.1800 64 bit (AMD64)] 11/20/2018 12:13:56 - Starting creation of CRTScript object 11/20/2018 12:13:56 - Starting creation of CRTSession object 11/20/2018 12:13:56 - Checking Connected Status. Got: 1 (True) 11/20/2018 12:13:56 - Session already connected. 11/20/2018 12:13:56 - Checking Connected Status. Got: 1 (True) I'm running SecureCRT 8.0.4. Any help would be appreciated!
jamiecaesar commented 5 years ago

Are you using the latest version of the scripts from the repository? I ran into this issue once a few months ago, and I feel like it was a bug in SecureCRT and I had to upgrade (although I don't know the exact version that fixed it -- I'm on 8.3 now, so that may have had something to do with it.

If your license won't allow you to upgrade any farther, and you are running the latest version of the scripts, then I could probably add an update to make the tab locking a setting controlled in the settings.ini file. That way you can turn it off and avoid that error.

The tab locking was something I added to the scripts when I noticed that pressing keys (either accidentally or on purpose) while a script is running can make them break since those keystrokes pass through to the end device and may garble a command the script is trying to send. When I realized SecureCRT allowed you to lock the tabs so they won't take any input, I modified my scripts to lock tabs when running and that is the function that is throwing the error -- specifically SecureCRT is throwing an error when the script makes the API call to lock the tab.

GabeSynthesis81 commented 5 years ago

I see. I just upgraded to 8.1.4 and it still throws the error. It sounds like I have to upgrade to 8.3+ before it would work, which is unfortunate since my license only goes up to 8.1. I'm using the latest version of scripts from the repository.
If you could make the tab lock an option that would be otherworldly amazing, and I would be forever in your debt.

jamiecaesar commented 5 years ago

Please pull/download the devel branch version. I've pushed an update that if the lock fails, the scripts will just continue on. Since I don't have that version installed, if you can test it out and make sure it works then I can merge the updates into the master branch. Thanks!

GabeSynthesis81 commented 5 years ago

Thank you sir!! Everything now works swimmingly!