comtypes TypeError: '_Dispatch' object is not callable
Describe the bug I get the following error when running the sample code:
Traceback (most recent call last):
File "C:\photoshop_test.py", line 4, in <module>
doc = app.documents.add()
File "C:\Users\zimonitrome\anaconda3\envs\blender\lib\site-packages\photoshop\api\_documents.py", line 51, in add
self.app.add(
TypeError: '_Dispatch' object is not callable
To Reproduce Steps to reproduce the behavior:
- create conda env with python 3.10 version
- pip install photoshop-python-api
- run script with sample code from readme.md
Expected behavior script to run without errors
Desktop (please complete the following information):
- OS: Windows10
- Photoshop Version: Photoshop v24.4.1 (Latest)
- Python Version: python-3.10
I also got the same error
In my case, the first successful run script used in venv in admin mode (I run VSCode using administrator on Win11). And when I install other ps version and make script crash, I fix it use same way.
Any news on this? Git the same error message with a fresh install (win10, latest Photoshop)
IIRC I wasn't able to solve it. I tried other COM packages but Photoshop's COM is seemingly broken(?)