Xshell Forum

Pyhon script error 80040154

Last post: Friday, October 23, 2015 9:19 AM by Jackie Yeh, 4 reply

Wednesday, July 8, 2015 11:32 AM - Jan

Pyhon script error 80040154

i runned the python script given named xshell_session.py/xshell_screen.py under the ScriptSample folder, it just cat an error
"Error:80040154, CoCreateInstance() for PYTHONSCRIPT"
My operating system is windows 7 64bits.

Can anyone help me?

Program Ver. : Xshell 5
Tuesday, July 14, 2015 7:51 AM - Support

Re: Pyhon script error 80040154

We are looking into script problem right now. Meanwhile, can you attach your script for us to review?

Technical Support
Thursday, September 10, 2015 2:46 AM - Jackie Yeh

Re: Pyhon script error 80040154

I have exactly the same issue.
My XShell version is 5.0.0027
Module info in detail:
Xshell.exe: 5.0.0027, nssock2.dll: 5.0.0018, nsssh3.dll: 5.0.0023, nsprofile2.dll: 5.0.0017, nslicense.dll: 5.0.0013, nsutil2.dll: 5.0.0016, nsverchk.exe: 5.0.0008, Xagent.exe: 5.0.0013, Xactivator.exe: 5.0.0003

It's a very simple Python script for test:
def Main():

Should I install Python in my system first?
PS. I'm running XShell on Win 8.1
Thursday, September 24, 2015 5:54 AM - Support

Re: Pyhon script error 80040154

Yes. You have to install Python engine. I am attaching the the instruction on how to prepare your system for Python scripts.

Technical Support

Like us on Facebook
Follow us on Twitter
Visit our blog Blog
Friday, October 23, 2015 9:19 AM - Jackie Yeh

Re: Pyhon script error 80040154

Hi Support!

Thank you so much, it works!

Just remind you there is a typo on the last page of the document:
The command is "python" instead of "pyhtong".
And somehow the Python2.7 engine didn't setup the path for python.exe, so I use the following command to finish it:

C:\Python27\Lib\site-packages\win32comext\axscript\client>\Python27\python.exe pyscript.py
Requesting elevation and retrying...
Registered: Python