_ctypes.COMError
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:

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!
@loonghao
though the error message appears in pycharm,layers can still be rasterized in Photoshop:
now I use "try...except..." to cuntiue
@jaye-li Can you give me a test psd file? This is convenient for me to debug, I tested several situations are normal
Happens to me when the file i want to work on is not on focus.