简体   繁体   中英

Python win32com - application installed with both 32bit and 64bit versions

I am using pythons win32com module to automate Adobe Photoshop. This works fine on some machines (have had issues with it not working on users with limited windows account permissions, but thats another issue).

But on machines with both the 32bit and 64bit versions of Photoshop installed, I am getting errors when trying to access com objects, not the Photoshop.Application object itself, but Photoshop.PhotoshopSaveOptions, and Photoshop.SolidColor com objects.

The error I get is Server Execution failed.

I guess win32com is getting confused with the different versions of photoshop. Aside from uninstalling one version, is there a way to specify which version win32com should be using?

Thanks

I am sure you have to have 32bit & 64bit python installed with appropriate pywin32 versions (32 & 64).

for 32bit Photoshop, run your script on 32 bit Python:

c:\python27\python myScript.py

for 64bit, just run 64bit Python:

c:\python27-64\python myScript.py

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM