Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document.activeLayer fails with Photoshop 2025 #382

Closed
BobbyCephy opened this issue Dec 21, 2024 · 2 comments
Closed

Document.activeLayer fails with Photoshop 2025 #382

BobbyCephy opened this issue Dec 21, 2024 · 2 comments

Comments

@BobbyCephy
Copy link

Executing

def activeLayer(self) -> PS_Layer:

leads to error

COMError: (-2147352567, 'Ausnahmefehler aufgetreten.', ('Illegal argument - argument 1\n- Required value is missing', 'Adobe Photoshop', None, 0, -2147220262))

caused by

type_ = self.eval_javascript("app.activeDocument.activeLayer.typename")

Desktop

  • OS: Windows10
  • Photoshop Version: Photoshop-2025
  • Python Version: python-3.11
@loonghao
Copy link
Owner

Test environment Photoshop 2025

from photoshop.api import Application
app = Application()
type_ = app.eval_javascript("app.activeDocument.activeLayer.typename")
print(type_)

image

@BobbyCephy
Copy link
Author

Thanks for the convincing test! Now that I was sure that the error was on my side, I found it: a stupid test script photoshop.py was in my path. Thank you so much for your excellent API!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants