出现该错误的原因是在“照片”应用程序的子文件夹中,索引存在问题。要解决此问题,请使用以下脚本:
tell application "Photos"
repeat with thisAlbum in (get albums)
tell thisAlbum
if name is equal to "YOUR SUB-FOLDER NAME" then
repeat with thisItem in (get media items of thisAlbum)
try
tell thisItem to export
end try
end repeat
end if
end tell
end repeat
end tell
将 “YOUR SUB-FOLDER NAME” 替换为你的子文件夹名称。将脚本复制到脚本编辑器中,保存并运行即可解决该问题。