PhotoScript icon indicating copy to clipboard operation
PhotoScript copied to clipboard

selection fails if user selects a "shared with you" image in the Library on Ventura

Open RhetTbull opened this issue 2 years ago • 2 comments

>>> photoscript.PhotosLibrary().selection
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/rhet/.pyenv/versions/osxphotos/lib/python3.11/site-packages/photoscript/__init__.py", line 132, in selection
    uuids = run_script("photosLibraryGetSelection")
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/rhet/.pyenv/versions/osxphotos/lib/python3.11/site-packages/photoscript/script_loader.py", line 18, in run_script
    return SCRIPT_OBJ.call(name, *args)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/rhet/.pyenv/versions/osxphotos/lib/python3.11/site-packages/applescript/__init__.py", line 110, in call
    return self._unpackresult(*self._script.executeAppleEvent_error_(evt, None))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/rhet/.pyenv/versions/osxphotos/lib/python3.11/site-packages/applescript/__init__.py", line 65, in _unpackresult
    raise ScriptError(errorinfo)
applescript.ScriptError: Photos got an error: Can’t get media item id "0034BCF0-4D72-451B-9F95-4D0522F05843/L0/001". (-1728) app='Photos' range=16820-16873

RhetTbull avatar Mar 31 '23 14:03 RhetTbull

I may not be able to fix this as it's an AppleScript interface limitation

RhetTbull avatar Mar 31 '23 14:03 RhetTbull

May be able to handle inside the AppleScript?

RhetTbull avatar Mar 31 '23 14:03 RhetTbull