Reputation: 133
Whenever Photoshop does not have a document open, I get this error:
pywintypes.com_error: (-2147352567, 'Exception occurred.', (0, 'Adobe Photoshop', 'No such element', None, 0, -2147352565), None)
which is PERFECTLY FINE: all I need to do is make a
try:
except:
block. However, I cannot except the error. I tried writing
except pywintypes.com_error:
however that did not work. So, how do I import the error into my py file?
EDIT::
I fixed it by typing
from pywintypes import com_error
Upvotes: 0
Views: 133