comtypes icon indicating copy to clipboard operation
comtypes copied to clipboard

Unable to create Illustrator object

Open lohriialo opened this issue 5 years ago • 0 comments

Usage:

from comtypes.client import GetActiveObject, CreateObject
app = CreateObject("Illustrator.Application")

Error:

Traceback (most recent call last):
  File "C:/Users/username/Documents/GitHub/illustrator-scripting-python/illustrator-test.py", line 10, in <module>
    app = CreateObject("Illustrator.Application")
  File "C:\Users\username\Documents\GitHub\illustrator-scripting-python\env\lib\site-packages\comtypes\client\__init__.py", line 250, in CreateObject
    return _manage(obj, clsid, interface=interface)
  File "C:\Users\username\Documents\GitHub\illustrator-scripting-python\env\lib\site-packages\comtypes\client\__init__.py", line 188, in _manage
    obj = GetBestInterface(obj)
  File "C:\Users\username\Documents\GitHub\illustrator-scripting-python\env\lib\site-packages\comtypes\client\__init__.py", line 112, in GetBestInterface
    interface = getattr(mod, itf_name)
AttributeError: module 'comtypes.gen.Illustrator' has no attribute '_Application'

Similar COM call from vb-script works, example Set appRef = CreateObject("Illustrator.Application")

lohriialo avatar Sep 11 '18 06:09 lohriialo