Python组件类型Photoshop 64位

Python组件类型Photoshop 64位,python,comtypes,photoshop-cs5,Python,Comtypes,Photoshop Cs5,我一直在使用Python的comtypes模块来自动化Photoshop CS5,但是当我尝试在Photoshop 64位上执行命令时,我遇到了一个类型错误。 这些相同的命令在Photoshop 32位上运行良好 这是我正在使用的代码的一个示例: from comtypes.client import CreateObject psApp = CreateObject("Photoshop.Application") #Create a new document- this is where i

我一直在使用Python的comtypes模块来自动化Photoshop CS5,但是当我尝试在Photoshop 64位上执行命令时,我遇到了一个类型错误。 这些相同的命令在Photoshop 32位上运行良好

这是我正在使用的代码的一个示例:

from comtypes.client import CreateObject
psApp = CreateObject("Photoshop.Application")
#Create a new document- this is where it bombs out!
psApp.Documents.Add(1024, 1024, 72, 'new_source_texture', 2, 1, 1)
这是我得到的回溯:

Traceback (most recent call last):
    File "test.py", line 9, in <module>
    psApp.Documents.Add(1024, 1024, 72, 'new_source_texture', 2, 1, 1)
TypeError: '_Dispatch' object is not callable
回溯(最近一次呼叫最后一次):
文件“test.py”,第9行,在
添加(1024,1024,72,'new_source_texture',2,1,1)
TypeError:“\u分派”对象不可调用

我是个新手,如果有人能给我指出正确的方向,我会非常感激

您是否在32位Python上运行了它?你试过64位Python吗?