Copy link to clipboard
Copied
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!
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.
Copy link to clipboard
Copied
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
What if you would uninstall PS2018?
Copy link to clipboard
Copied
We did but it did not help. I did choose "keep preferences" maybe that left something in the registry?
Copy link to clipboard
Copied
Always do the install as the last. I would uninstall 2019 and install again.