photoshop-python-api: Getting Windows error "FileNotFoundError"

Just installed the package and copied the exact usage example from the docs (active layer). Windows throws this WinError 2 error because apparently I have a 32 bits Python and it’s looking for Photoshop as if it was also 32 bits (which is is not) according to this stack overflow issue.

Using the suggested answer of adding the argument access=winreg.KEY_READ | winreg.KEY_WOW64_64KEY inside the function _get_install_version in _core.py worked for me.

key = winreg.OpenKey(
        winreg.HKEY_LOCAL_MACHINE,
        self.REG_PATH,
        access=winreg.KEY_READ | winreg.KEY_WOW64_64KEY
)

Just in case: Using Windows 10, Python 3.7 and version 0.6.0 of this package.

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 17 (11 by maintainers)

Most upvoted comments

once again Thank for your report, I will update the logic later, I find it may be more accurate to use environment variables to determine. image