[Pythonmac-SIG] Can't get ASDictionary to work (py2app problems?)

has hengist.podd at virgin.net
Mon Jun 1 22:19:01 CEST 2009


Nicholas Riley wrote:

> I'm trying to use appscript on my MacBook Pro running OS X 10.5.7 and
> the stock Apple Python.  It's never had appscript installed before.
> However, I can't get the binary ASDictionary I downloaded to run:
>
>  Traceback (most recent call last):
>    File "/Developer/Applications/appscript/ASDictionary.app/Contents/ 
> Resources/__boot__.py", line 31, in <module>
>      _run('ASDictionary.py')
>    File "/Developer/Applications/appscript/ASDictionary.app/Contents/ 
> Resources/__boot__.py", line 28, in _run
>      execfile(path, globals(), globals())
>    File "/Developer/Applications/appscript/ASDictionary.app/Contents/ 
> Resources/ASDictionary.py", line 17, in <module>
>      import osax, appscript, mactypes
>    File "build/bdist.macosx-10.3-i386/egg/osax.py", line 38, in  
> <module>
>    File "build/bdist.macosx-10.3-i386/egg/aem/aemsend.py", line 82,  
> in send
>  aem.aemsend.EventError: Command failed: Application could not  
> handle this command. (-1708)
>  2009-05-31 15:42:43.946 ASDictionary[4551:10b] ASDictionary Error
>  2009-05-31 15:42:43.948 ASDictionary[4551:10b] ASDictionary Error
>  An unexpected error has occurred during execution of the main script


Odd. The osax module appears to be puking on a System Events command  
(it uses SE to get a list of installed osaxen). What versions of  
appscript and ASDictionary? What happens if you try to import the osax  
module into a regular script? Anything unusual about your setup  
(permissions, haxies, etc.)?

PyObjC/py2app questions I'll leave to those that know more about these  
things. (FWIW, I build ASDictionary using user-installed Python 2.5.2  
framework + PyObjC 1.x for portability.)


has
-- 
Control AppleScriptable applications from Python, Ruby and ObjC:
http://appscript.sourceforge.net



More information about the Pythonmac-SIG mailing list