[Pythonmac-SIG] appscript

Christian Bird cabird at gmail.com
Thu Feb 22 05:31:28 CET 2007


I just found out about appscript and am attempting to use it on my
macbook pro (OS X 10.4.8 and python 2.4.3).  I installed appscript,
but the following is what I get when I try to test it out.  Has anyone
seen anything similar to this?  Any ideas of what I may need to do to
get it to work correctly.  The same error appears regardless of which
app I try to control (and yes, itunes is running when I tried this).
Thanks for any help anyone  can provide.

Python 2.4.3 (#1, Jul 18 2006, 16:14:01)
[GCC 4.0.1 (Apple Computer, Inc. build 5250)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from appscript import *
>>> itunes = app('iTunes')
>>> itunes
app(u'/Applications/iTunes.app')
>>> itunes.name
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
  File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/aeosa/appscript/reference.py",
line 441, in __getattr__
    selectorType, code = self.AS_appdata.referencebyname[name]
  File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/aeosa/appscript/reference.py",
line 227, in <lambda>
    referencebyname = property(lambda self: self.connect().referencebyname)
  File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/aeosa/appscript/reference.py",
line 215, in connect
    self._terms = terminology.tablesforapp(self.target)
  File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/aeosa/appscript/terminology.py",
line 182, in tablesforapp
    _terminologyCache[app.AEM_identity] = tablesforaetedata(aetedataforapp(app))
  File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/aeosa/appscript/terminology.py",
line 154, in aetedataforapp
    raise RuntimeError, "Can't get terminology for application (%r):
%s" % (app, e)
RuntimeError: Can't get terminology for application
(aem.Application(u'/Applications/iTunes.app')): CommandError -600: no
eligible process with specified descriptor
>>> itunes.help()
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
  File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/aeosa/appscript/reference.py",
line 286, in help
    return self.AS_appdata.help(flags, self)
  File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/aeosa/appscript/reference.py",
line 246, in help
    helpObj = Help(terminology.aetedataforapp(self.target),
self.identifier or 'Current Application')
  File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/aeosa/appscript/terminology.py",
line 154, in aetedataforapp
    raise RuntimeError, "Can't get terminology for application (%r):
%s" % (app, e)
RuntimeError: Can't get terminology for application
(aem.Application(u'/Applications/iTunes.app')): CommandError -600: no
eligible process with specified descriptor
>>>

-- Chris

-- 
Christian Bird
cabird at gmail.com


More information about the Pythonmac-SIG mailing list