Welcome to the VanDyke Software Forums

Join the discussion today!


Go Back   VanDyke Software Forums > Scripting

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 06-07-2011, 07:47 AM
aUser aUser is offline
Registered User
 
Join Date: Jun 2011
Posts: 1
Unhappy Python - The script cannot be run because a script is currently running.

.... Only one script at a time can be run.

I am a new SecureCRT user and have struggled getting a script to run that uses an input file to make decisions based on data points included as csv file column headers in order to iteratively connect to a set of hosts to perform password changes.
My environment is Windows XP, SecureCRT 6.7.0 (build 137), and I am using Python. At first I had pywin32 installed. I read a thread on the forum about needing ActiveX hooks to access script language interpreter, so removed and installed ActivePython 2.7, then read somewhere that SecureCRT has an embedded Python interpreter and does not use any instances of Python interpreters installed on your system. Can someone confirm this and if true, is the Python interpreter a full version with all the inclusive modules (which version?)
I do not want to use VBScript if it all possible and would prefer to stick with Python.

My issue:
The thread title is the error message I receive when opening SecureCRT, closing prebuilt sessions selection box, selecting, Script, Run, and browsing to my script file.
I can tell the script begins to run, as it does perform part of the script, then it generates said error message.
I have a Main routine and three subroutines in this script. I have tried enclosing the 3 subroutines called within the Main routine when run, as well as defining the 3 subroutines prior to defining Main routine and calling Main routine. My guess is that this is a SecureCRT app limitation in its ability to call precedingly defined or embedded subroutines from the Main routine.
Please sort me out on this error so I can stop torturing myself!

I WILL POST MY EXAMPLE SCRIPT NEXT.
Reply With Quote
  #2  
Old 06-07-2011, 10:01 AM
bgagnon bgagnon is offline
VanDyke Technical Support
 
Join Date: Oct 2008
Posts: 4,524
Hello aUser,

An example script might not fit the bill. Could you send a copy of the "real script" to support@vandyke.com?

Please include "Attn Brenda - Forum Thread #8020" in the subject line.

As a note, build 137 was the beta 3 release. The official version SecureCRT 6.7 is available now.

Quote:
Can someone confirm this and if true, is the Python interpreter a full version with all the inclusive modules (which version?)
In answer to the above, the version of python that ships with SecureCRT for Windows is found by right-clicking on the "python26.dll" file that resides in SecureCRT's program files install location:
2.6.5150.1013
If curious as to the modules shipped with SecureCRT, you can look inside the "python26.zip" file also located in the SecureCRT installation folder.
__________________
Thanks,
--Brenda

VanDyke Software
Technical Support
support@vandyke.com
(505) 332-5730

Last edited by bgagnon; 06-07-2011 at 11:13 AM.
Reply With Quote
  #3  
Old 11-27-2017, 04:47 AM
itzvinodh itzvinodh is offline
Registered User
 
Join Date: Nov 2017
Posts: 3
Script Cannot be run Only one script can run at a time

Hi,
I have added the button to run the python script. to run sample ls command it was thowing the error like script cannot be run. it is currently running.Only one script can run at a time error.
Reply With Quote
  #4  
Old 11-27-2017, 09:44 AM
bgagnon bgagnon is offline
VanDyke Technical Support
 
Join Date: Oct 2008
Posts: 4,524
Hi itzvinodh,

I have no context for the issue you are reporting. This thread is over 6 years old.

You are running which python script from a button?

Is Cancel available from the Script menu?

If so, a script is running. You might choose Cancel to determine what script was running. Maybe it's a logon script associated with a session (Connection / Logon Actions category in Session Options).
__________________
Thanks,
--Brenda

VanDyke Software
Technical Support
support@vandyke.com
(505) 332-5730
Reply With Quote
  #5  
Old 11-26-2020, 10:45 AM
mohenoun mohenoun is offline
Registered User
 
Join Date: Nov 2020
Posts: 21
Same issue different flavor

Hello,

I created several buttons to connect to my routers.

The idea is connect to jumpstart, then router.

When I try to connect to another equipment I get the message.

I used a very basic script :

crt.Screen.Synchronous = True

' This automatically generated script may need to be
' edited in order to work correctly.

Sub Main
crt.Screen.Synchronous = True
crt.Session.ConnectInTab("/s jumpstart.server")
crt.Screen.WaitForString "#"
szTabName = "ROUTER01"
crt.Window.Caption = szTabName
crt.Screen.Send "ssh -l myusername ROUTER01" & vbcr
crt.Screen.WaitForString "Password:"
crt.Screen.Send "Pa$$word" & vbcr
crt.Screen.WaitForString "ROUTER01#"
crt.Screen.Send vbcr
End Sub

crt.Screen.Synchronous = False

Is there a way to tell it stop this and to allow the launch of another script ?

Thank you.

Reply With Quote
  #6  
Old 11-30-2020, 11:29 AM
bgagnon bgagnon is offline
VanDyke Technical Support
 
Join Date: Oct 2008
Posts: 4,524
Hi mohenoun,
Quote:
Is there a way to tell it stop this and to allow the launch of another script ?
Are you saying you are getting the error listed as the topic of this thread?

If so, what other script is running?

Is Cancel available in the Script menu? If so, and you choose Cancel, what is the error?
__________________
Thanks,
--Brenda

VanDyke Software
Technical Support
support@vandyke.com
(505) 332-5730
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -6. The time now is 12:06 PM.