altica
Posts: 31
Joined: Thu Mar 19, 2009 12:07 am

Postby altica » Wed Mar 14, 2012 11:29 am

I am trying to get the sample Python channel plugin working but get the error message:

'Can't open registry key "HKEY_LOCAL_MACHINE\Software\CLASSES\py_auto_file\shell\open\command": The system cannot find the file specified.'

I have installed the Win32 extensions (for Python 2.7) from pywin32-217.win32-py2.7.exe

Any ideas?
Graham

User avatar
support
Site Admin
Posts: 3021
Joined: Fri Feb 07, 2003 12:48 pm
Location: Melbourne, Australia
Contact:

Postby support » Thu Mar 15, 2012 3:31 am

This sounds like Awasu is having trouble figuring out how to launch the Python interpreter.

IIRC, there is an option in the Python installer to associate .PY files with Python (i.e. if you try to launch a .PY file, Windows knows to start Python) - did you turn this on?

If re-installing Python doesn't fix it, you can manually tell Awasu how to start the Python interpreter by following the instructions here. You will want something like this in your GLOBAL.INI file:

Code: Select all

[Scripting File Associations]
.py=c:\python\python.exe "%1" "%2"

User avatar
support
Site Admin
Posts: 3021
Joined: Fri Feb 07, 2003 12:48 pm
Location: Melbourne, Australia
Contact:

Postby support » Thu Mar 15, 2012 3:33 am

altica wrote:I have installed the Win32 extensions (for Python 2.7) from pywin32-217.win32-py2.7.exe

And if years of doing tech support has taught me anything, it's that there are no silly questions. You did install Python as well, right...? :)

altica
Posts: 31
Joined: Thu Mar 19, 2009 12:07 am

Postby altica » Fri Mar 16, 2012 10:54 pm

Yes I DID install Python!
Graham

altica
Posts: 31
Joined: Thu Mar 19, 2009 12:07 am

Postby altica » Fri Mar 16, 2012 11:03 pm

I created the GLOBAL.ini as requested and now get the error message "Can't run the script: The system cannot find the file specified. "

I have Python 2.7 installed - will this conflict with Python 2.5 in the Awasu install?

I am running on WIndows 7 - are there any known Python registry problems with this?
Graham

User avatar
support
Site Admin
Posts: 3021
Joined: Fri Feb 07, 2003 12:48 pm
Location: Melbourne, Australia
Contact:

Postby support » Sat Mar 17, 2012 2:46 am

altica wrote:I created the GLOBAL.ini as requested and now get the error message "Can't run the script: The system cannot find the file specified. "

I have Python 2.7 installed - will this conflict with Python 2.5 in the Awasu install?

Send me your GLOBAL.INI file and I'll take a look at it. Just to confirm, this file needs to be in the Awasu installation directory e.g. C:\Program Files\Awasu\

The problem is that Awasu can't start the Python interpreter, so the embedded Python 2.5 is unlikely to be causing problems.

If you double-click on a .py file in Explorer, does it launch?

altica wrote:I am running on WIndows 7 - are there any known Python registry problems with this?

Not that I'm aware of.

User avatar
kevotheclone
Posts: 239
Joined: Mon Sep 08, 2008 7:16 pm
Location: Elk Grove, California

Postby kevotheclone » Sat Mar 17, 2012 9:58 pm

I've used the ActiveState distribution of Python where it registers the file extensions upon installation so I've never had too much trouble with issues like this.

There are some commands you can type at the Command Prompt and environment variables you can modify to reduce this "C:\path\to\python\python.exe C:\path\to\my\scripts\MyScript.py" down to as little as "MyScript". this would be a system wide change not just an Awasu change, which will make working with a scripting language easier... EVERYWHERE.

The commands are:
  • ASSOC
  • FTYPE

The environment variables are:
  • PATH
  • PATHEXT

I'll try to create an Awasu Wiki page with more detailed information in the next few days, but for now if you're interested, type "FTYPE /?" at the Command Prompt to get the details.

altica
Posts: 31
Joined: Thu Mar 19, 2009 12:07 am

Postby altica » Tue Mar 20, 2012 10:17 pm

Apologies - I had the incorrect path set to python.exe

Schoolboy error! :roll:

Thanks for your help - this opens up a lot of exciting possibilities for Awasu!
Graham


Return to “Awasu - Bug Reports”

Who is online

Users browsing this forum: Bing [Bot] and 3 guests