photoshop-python-api icon indicating copy to clipboard operation
photoshop-python-api copied to clipboard

_ctypes.COMError

Open jaye-li opened this issue 4 years ago • 4 comments

Describe the bug I want to rasterize all layers imported from PDF,but i received : _ctypes.COMError: (-2147352577, '出现了内部错误。', (None, None, None, 0, None))

To Reproduce my code: for j in doc.layers: j.rasterize(target=5)

the tracebake: image

Desktop (please complete the following information):

  • OS: [e.g. Windows10]
  • Photoshop Version: [e.g. Photoshop-2021]
  • Python Version: [e.g. python-3.9]

Additional context thanks for your solution!

jaye-li avatar Sep 14 '21 19:09 jaye-li

@loonghao

jaye-li avatar Sep 14 '21 19:09 jaye-li

though the error message appears in pycharm,layers can still be rasterized in Photoshop: image now I use "try...except..." to cuntiue

jaye-li avatar Sep 14 '21 19:09 jaye-li

@jaye-li Can you give me a test psd file? This is convenient for me to debug, I tested several situations are normal

loonghao avatar Sep 19 '21 13:09 loonghao

Happens to me when the file i want to work on is not on focus.

blunderedbishop avatar Mar 08 '22 22:03 blunderedbishop