Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Photoshop CC 2019 COM issues. (Programming)

Explorer ,
Oct 16, 2018 Oct 16, 2018

A new version of Photoshop and new COM issues. So what has changed and how do I adapt?

I have a program that talks to Photoshop through COM.

When I run my PyQt application I get this error log:

Traceback (most recent call last):

  File "main.py", line 872, in <module>

  File "exporter.pyc", line 45, in __init__

  File "comtypes\client\__init__.pyc", line 227, in CreateObject

  File "comtypes\GUID.pyc", line 78, in from_progid

  File "_ctypes/callproc.c", line 945, in GetResult

WindowsError: [Error -2147221005] Invalid class string

The same error but when I run the program's source code through a python interpreter:

Traceback (most recent call last):

  File "C:/Projects/tools/TextureTools/PhotoshopExporter/source/main.py", line 872, in <module>

    ps = PhotoshopInterface(EC)

  File "C:\Projects\tools\TextureTools\PhotoshopExporter\source\exporter.py", line 45, in __init__

    self.psApp = comtypes.client.CreateObject('Photoshop.Application', dynamic=True)

  File "C:\Anaconda\lib\site-packages\comtypes\client\__init__.py", line 227, in CreateObject

    clsid = comtypes.GUID.from_progid(progid)

  File "C:\Anaconda\lib\site-packages\comtypes\GUID.py", line 78, in from_progid

    _CLSIDFromProgID(unicode(progid), byref(inst))

  File "_ctypes/callproc.c", line 945, in GetResult

WindowsError: [Error -2147221005] Invalid class string

Any help understanding this would be greatly appreciated!

TOPICS
Actions and scripting
2.7K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Explorer , Oct 16, 2018 Oct 16, 2018

Yes please!

 

 

I have found the issue. In previous versions I could connect to "Photoshop.Application" but now I have to be super specific about the application version.

self.psApp = comtypes.client.CreateObject('Photoshop.Application.130', dynamic=True)

Really wish that wasn't the case because now I have to update this part of the code with new versions or write code to detect which one is installed on my system.

Translate
Adobe
Guest
Oct 16, 2018 Oct 16, 2018

Hi

This may be one for the Photoshop Scripting forum

I can move the thread for you if you like

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Oct 16, 2018 Oct 16, 2018

Yes please!

 

 

I have found the issue. In previous versions I could connect to "Photoshop.Application" but now I have to be super specific about the application version.

self.psApp = comtypes.client.CreateObject('Photoshop.Application.130', dynamic=True)

Really wish that wasn't the case because now I have to update this part of the code with new versions or write code to detect which one is installed on my system.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Oct 16, 2018 Oct 16, 2018

What if you would uninstall PS2018?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Oct 16, 2018 Oct 16, 2018

We did but it did not help. I did choose "keep preferences" maybe that left something in the registry?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Oct 16, 2018 Oct 16, 2018
LATEST

Always do the install as the last. I would uninstall 2019 and install again.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines