RhetTbull / osxphotos

Python app to work with pictures and associated metadata from Apple Photos on macOS. Also includes a package to provide programmatic access to the Photos library, pictures, and metadata.
MIT License
1.84k stars 94 forks source link

EXIFTOOL errno 13 ? #1352

Open kaiserghetto opened 6 months ago

kaiserghetto commented 6 months ago

Just need help with troubleshooting as I'm not verse in OSX Trying to export my iPhotos library to my NAS and I'm running into this issue exporting EXIF data (works fine without EXIF data).

kaiserghetto@Kaiserghetto-iMac ~ % osxphotos export  /Volumes/Kaiserghetto/Pictures --exiftool --verbose --verbose --verbose  --directory "{created.year}-{created.mm}" --to-date "2020-01-01" --ramdb --update --favorite-rating  
osxphotos version: 0.67.0
Python version: 3.12.1 (main, Dec  8 2023, 19:21:52) [Clang 14.0.3 (clang-1403.0.22.14.1)]
Platform: macOS-13.6.1-x86_64-i386-64bit, 13.6.1
Verbose level: 3
exiftool path: /usr/local/bin/exiftool
Using last opened Photos library: /Users/kaiserghetto/Pictures/Photos.photoslibrary
WARNING: found other export database files in this destination directory branch. This likely means you are attempting to export files into a directory that is either the parent or a child directory of a previous 
export. Proceeding may cause your exported files to be overwritten.
You are exporting to /Volumes/Kaiserghetto/Pictures, found .osxphotos_export.db files in:
/Volumes/Kaiserghetto/Pictures/BigVideos/.osxphotos_export.db
Do you want to continue? [y/N]: y
Using export database /Volumes/Kaiserghetto/Pictures/.osxphotos_export.db
Processing database /Users/kaiserghetto/Pictures/Photos.photoslibrary/database/photos.db
Processing database /Users/kaiserghetto/Pictures/Photos.photoslibrary/database/Photos.sqlite
Processing database.
Database version: 6000, 8.
Processing persons in photos.
Processing detected faces in photos.
Processing albums.
Processing keywords.
Processing photo details.
Processing import sessions.
Processing additional photo details.
Processing face details.
Processing photo labels.
Processing EXIF details.
Processing computed aesthetic scores.
Processing comments and likes for shared photos.
Processing moments.
Processing syndication info.
Processing shared iCloud library info
Done processing details from Photos library.
Exporting 37 photos to /Volumes/Kaiserghetto/Pictures...
Exporting IMG_3815.JPG (57B3865A-20EE-41BC-B84E-77040A9E609C.jpeg) (1/37)
Writing metadata with exiftool for IMG_3815.JPG
Error exporting photo (57B3865A-20EE-41BC-B84E-77040A9E609C: IMG_3815.JPG) as IMG_3815.JPG: Error copying file /var/folders/6c/f2pmb42116gfqtp4mv7q9b0h0000gn/T/osxphotos_export_2ww_99ji/57B3865A-20EE-41BC-B84E-77040A9E609C_exiftool.jpeg to /Volumes/Kaiserghetto/Pictures/2020-04/IMG_3815.JPG: Error copying /var/folders/6c/f2pmb42116gfqtp4mv7q9b0h0000gn/T/osxphotos_export_2ww_99ji/57B3865A-20EE-41BC-B84E-77040A9E609C_exiftool.jpeg to /Volumes/Kaiserghetto/Pictures/2020-04/IMG_3815.JPG: [Errno 13] Permission denied: '/Volumes/Kaiserghetto/Pictures/2020-04/IMG_3815.JPG' (photoexporter.py: 994)
(...)
Exporting 37 photos ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100% 0:00:00
Processed: 37 photos, exported: 0, updated: 0, skipped: 0, updated EXIF data: 0, missing: 0, error: 37
Elapsed time: 0:00:09
Writing export database changes back to /Volumes/Kaiserghetto/Pictures/.osxphotos_export.db
Cleaning up lock files
RhetTbull commented 6 months ago

Does this happen with every photo when using --exiftool or just some of them?

kaiserghetto commented 6 months ago

in the batch of 37 that I'm running here, it happened on all

kaiserghetto commented 6 months ago

something related to permissions to _temp_dir_path ?

RhetTbull commented 6 months ago

Definitely looks like a permission issue but I don't understand why. What version of macOS are you using?

RhetTbull commented 6 months ago

Also, try running with --tmpdir /private/tmp which tells osxphotos to use a specific temporary directory

kaiserghetto commented 6 months ago

Same. And verbose doesn't show me much info within EXIFTOOL. I'm using Ventura 13.6.1

Last login: Fri Dec 29 09:34:08 on console kaiserghetto@Kaiserghetto-iMac ~ % osxphotos export --exiftool --name "IMG_5564.JPG" /Volumes/Kaiserghetto/Pictures/ --directory "{created.year}-{created.month}" --tmpdir /private/tmp (...) Error exporting photo (2381A705-1226-4BF7-8664-407C66E27209: IMG_5564.JPG) as IMG_5564.JPG: Error copying file /private/tmp/osxphotos_export_rcyuo9b_/2381A705-1226-4BF7-8664-407C66E27209_exiftool.jpeg to /Volumes/Kaiserghetto/Pictures/2021-November/IMG_5564 (3).JPG: Error copying /private/tmp/osxphotos_export_rcyuo9b_/2381A705-1226-4BF7-8664-407C66E27209_exiftool.jpeg to /Volumes/Kaiserghetto/Pictures/2021-November/IMG_5564 (3).JPG: [Errno 13] Permission denied: '/Volumes/Kaiserghetto/Pictures/2021-November/IMG_5564 (3).JPG' (photoexporter.py: 994)

kaiserghetto commented 6 months ago

I was able to see the file in the tmp dir, so it seems the issue is on the NAS side(?). I tried Retry 3 and got the same error three times in a row. I'm using FreeNAS

RhetTbull commented 6 months ago

Two other things to try:

  1. Create a directory somewhere on your Mac then try the export again using the same options but using the newly created directory as the destination. You can limit the number of photos exported by adding --limit 10 as this is just a test to see if exiftool works.

  2. Try again to the NAS but add the --debug flag between osxphotos and export so: osxphotos --debug export ...rest of your options. This should cause osxphotos to crash when it hits the error and write a crash log (osxphotos_crash.log) which you can post here. That will include information on where exactly the error is occuring.

oPromessa commented 6 months ago

Just to be on the safe side make sure you have permissions and can create a file on the NAS folder.

Something like running these commands on Terminal:

$ touch  /Volumes/Kaiserghetto/Pictures/file.txt

$ ls -l /Volumes/Kaiserghetto/Pictures/file.txt

$ rm /Volumes/Kaiserghetto/Pictures/file.txt
kaiserghetto commented 6 months ago

@oPromessa I do have perms to the share, original exports do get created but the EXIFTOOL can't overwrite them. from your test... his is what the file.txt looks like -rwxrwxr-x 1 kaiserghetto staff 0 Dec 29 2023 /Volumes/Kaiserghetto/Pictures/file.txt

@RhetTbull works fine on my local computer, so definitively the SMB share on the NAS. Log below.

osxphotos crash log Created: 2023-12-29 10:39:00.811658 osxphotos version: 0.67.0 Platform: macOS-13.6.1-x86_64-i386-64bit Python version: 3.12.1 (main, Dec 8 2023, 19:21:52) [Clang 14.0.3 (clang-1403.0.22.14.1)] sys.argv: ['/Users/kaiserghetto/.local/bin/osxphotos', '--debug', 'export', '--name', 'IMG_5564.JPG', '/Volumes/Kaiserghetto/Pictures/', '--directory', '{created.year}-{created.month}d', '--exiftool', '--tmpdir', '/private/tmp'] CRASH_DATA: locals: {'dest': '/Volumes/Kaiserghetto/Pictures/', 'db': None, 'add_exported_to_album': None, 'add_missing_to_album': None, 'add_skipped_to_album': None, 'added_after': None, 'added_before': None, 'added_in_last': None, 'album': (), 'album_keyword': False, 'alt_db': None, 'alt_copy': False, 'append': False, 'beta': False, 'burst': False, 'checkpoint': None, 'cleanup': False, 'cloudasset': False, 'config_only': False, 'convert_to_jpeg': False, 'crash_after': None, 'current_name': False, 'deleted': False, 'deleted_only': False, 'description': (), 'description_template': None, 'directory': '{created.year}-{created.month}d', 'download_missing': False, 'dry_run': False, 'duplicate': False, 'edited': False, 'edited_suffix': None, 'exif': (), 'exiftool': True, 'exiftool_merge_keywords': False, 'exiftool_merge_persons': False, 'exiftool_option': (), 'exiftool_path': None, 'export_as_hardlink': False, 'export_by_date': False, 'exportdb': None, 'external_edit': False, 'favorite': False, 'favorite_rating': False, 'filename_template': None, 'finder_tag_keywords': False, 'finder_tag_template': (), 'folder': (), 'force_update': False, 'from_date': None, 'from_time': None, 'has_comment': False, 'has_likes': False, 'has_raw': False, 'hdr': False, 'hidden': False, 'ignore_case': False, 'ignore_date_modified': False, 'ignore_exportdb': False, 'ignore_signature': False, 'in_album': False, 'incloud': False, 'is_reference': False, 'jpeg_ext': None, 'jpeg_quality': None, 'keep': (), 'keyword': (), 'keyword_template': (), 'label': (), 'limit': None, 'live': False, 'load_config': None, 'location': False, 'max_size': None, 'min_size': None, 'missing': False, 'name': ('IMG_5564.JPG',), 'no_comment': False, 'no_description': False, 'no_exportdb': False, 'no_keyword': False, 'no_likes': False, 'no_location': False, 'no_place': False, 'no_progress': False, 'no_title': False, 'not_burst': False, 'not_cloudasset': False, 'not_edited': False, 'not_favorite': False, 'not_hdr': False, 'not_hidden': False, 'not_in_album': False, 'not_incloud': False, 'not_live': False, 'not_missing': False, 'not_panorama': False, 'not_portrait': False, 'not_reference': False, 'not_screenshot': False, 'not_selfie': False, 'not_shared': False, 'not_slow_mo': False, 'not_time_lapse': False, 'only_movies': False, 'only_new': False, 'only_photos': False, 'original_suffix': None, 'overwrite': False, 'panorama': False, 'person': (), 'person_keyword': False, 'place': (), 'portrait': False, 'post_command': (), 'post_command_error': None, 'post_function': (), 'preview': False, 'preview_if_missing': False, 'preview_suffix': None, 'print_template': (), 'query_eval': (), 'query_function': (), 'ramdb': False, 'regex': (), 'replace_keywords': False, 'report': None, 'retry': None, 'save_config': None, 'screenshot': False, 'selfie': False, 'shared': False, 'export_aae': False, 'sidecar': (), 'sidecar_drop_ext': False, 'sidecar_template': (), 'skip_bursts': False, 'skip_edited': False, 'skip_live': False, 'skip_original_if_edited': False, 'skip_raw': False, 'skip_uuid': (), 'skip_uuid_from_file': None, 'slow_mo': False, 'strip': False, 'theme': None, 'time_lapse': False, 'timestamp': False, 'title': (), 'tmpdir': '/private/tmp', 'to_date': None, 'to_time': None, 'touch_file': False, 'update': False, 'update_errors': False, 'use_photokit': False, 'use_photos_export': False, 'uti': None, 'uuid': (), 'uuid_from_file': None, 'verbose_flag': 0, 'xattr_template': (), 'year': (), 'syndicated': False, 'not_syndicated': False, 'saved_to_library': False, 'not_saved_to_library': False, 'shared_moment': False, 'not_shared_moment': False, 'shared_library': False, 'not_shared_library': False, 'selected': False, 'ctx': <click.core.Context object at 0x1062da3c0>, 'cli_obj': <osxphotos.cli.cli.CLI_Obj object at 0x10de7ba70>} :

RhetTbull commented 6 months ago

@kaiserghetto looks like the log got truncated when you pasted. You can also attach the log as a file attachment to the issue comment.

kaiserghetto commented 6 months ago
osxphotos crash log
Created: 2023-12-29 11:08:01.143289
osxphotos version: 0.67.0
Platform: macOS-13.6.1-x86_64-i386-64bit
Python version: 3.12.1 (main, Dec  8 2023, 19:21:52) [Clang 14.0.3 (clang-1403.0.22.14.1)]
sys.argv: ['/Users/kaiserghetto/.local/bin/osxphotos', '--debug', 'export', '--name', 'IMG_5564.JPG', '/Volumes/Kaiserghetto/Pictures/', '--directory', '{created.year}-{created.month}d', '--exiftool', '--tmpdir', '/private/tmp']
CRASH_DATA:
locals: {'dest': '/Volumes/Kaiserghetto/Pictures/', 'db': None, 'add_exported_to_album': None, 'add_missing_to_album': None, 'add_skipped_to_album': None, 'added_after': None, 'added_before': None, 'added_in_last': None, 'album': (), 'album_keyword': False, 'alt_db': None, 'alt_copy': False, 'append': False, 'beta': False, 'burst': False, 'checkpoint': None, 'cleanup': False, 'cloudasset': False, 'config_only': False, 'convert_to_jpeg': False, 'crash_after': None, 'current_name': False, 'deleted': False, 'deleted_only': False, 'description': (), 'description_template': None, 'directory': '{created.year}-{created.month}d', 'download_missing': False, 'dry_run': False, 'duplicate': False, 'edited': False, 'edited_suffix': None, 'exif': (), 'exiftool': True, 'exiftool_merge_keywords': False, 'exiftool_merge_persons': False, 'exiftool_option': (), 'exiftool_path': None, 'export_as_hardlink': False, 'export_by_date': False, 'exportdb': None, 'external_edit': False, 'favorite': False, 'favorite_rating': False, 'filename_template': None, 'finder_tag_keywords': False, 'finder_tag_template': (), 'folder': (), 'force_update': False, 'from_date': None, 'from_time': None, 'has_comment': False, 'has_likes': False, 'has_raw': False, 'hdr': False, 'hidden': False, 'ignore_case': False, 'ignore_date_modified': False, 'ignore_exportdb': False, 'ignore_signature': False, 'in_album': False, 'incloud': False, 'is_reference': False, 'jpeg_ext': None, 'jpeg_quality': None, 'keep': (), 'keyword': (), 'keyword_template': (), 'label': (), 'limit': None, 'live': False, 'load_config': None, 'location': False, 'max_size': None, 'min_size': None, 'missing': False, 'name': ('IMG_5564.JPG',), 'no_comment': False, 'no_description': False, 'no_exportdb': False, 'no_keyword': False, 'no_likes': False, 'no_location': False, 'no_place': False, 'no_progress': False, 'no_title': False, 'not_burst': False, 'not_cloudasset': False, 'not_edited': False, 'not_favorite': False, 'not_hdr': False, 'not_hidden': False, 'not_in_album': False, 'not_incloud': False, 'not_live': False, 'not_missing': False, 'not_panorama': False, 'not_portrait': False, 'not_reference': False, 'not_screenshot': False, 'not_selfie': False, 'not_shared': False, 'not_slow_mo': False, 'not_time_lapse': False, 'only_movies': False, 'only_new': False, 'only_photos': False, 'original_suffix': None, 'overwrite': False, 'panorama': False, 'person': (), 'person_keyword': False, 'place': (), 'portrait': False, 'post_command': (), 'post_command_error': None, 'post_function': (), 'preview': False, 'preview_if_missing': False, 'preview_suffix': None, 'print_template': (), 'query_eval': (), 'query_function': (), 'ramdb': False, 'regex': (), 'replace_keywords': False, 'report': None, 'retry': None, 'save_config': None, 'screenshot': False, 'selfie': False, 'shared': False, 'export_aae': False, 'sidecar': (), 'sidecar_drop_ext': False, 'sidecar_template': (), 'skip_bursts': False, 'skip_edited': False, 'skip_live': False, 'skip_original_if_edited': False, 'skip_raw': False, 'skip_uuid': (), 'skip_uuid_from_file': None, 'slow_mo': False, 'strip': False, 'theme': None, 'time_lapse': False, 'timestamp': False, 'title': (), 'tmpdir': '/private/tmp', 'to_date': None, 'to_time': None, 'touch_file': False, 'update': False, 'update_errors': False, 'use_photokit': False, 'use_photos_export': False, 'uti': None, 'uuid': (), 'uuid_from_file': None, 'verbose_flag': 0, 'xattr_template': (), 'year': (), 'syndicated': False, 'not_syndicated': False, 'saved_to_library': False, 'not_saved_to_library': False, 'shared_moment': False, 'not_shared_moment': False, 'shared_library': False, 'not_shared_library': False, 'selected': False, 'ctx': <click.core.Context object at 0x10b1ee4e0>, 'cli_obj': <osxphotos.cli.cli.CLI_Obj object at 0x10b1ee4b0>}
osxphotos version: 0.67.0
Error: Error copying file /private/tmp/osxphotos_export_ymmbv8xd/2381A705-1226-4BF7-8664-407C66E27209_exiftool.jpeg to /Volumes/Kaiserghetto/Pictures/2021-Novemberd/IMG_5564 (2).JPG: Error copying /private/tmp/osxphotos_export_ymmbv8xd/2381A705-1226-4BF7-8664-407C66E27209_exiftool.jpeg to /Volumes/Kaiserghetto/Pictures/2021-Novemberd/IMG_5564 (2).JPG: [Errno 13] Permission denied: '/Volumes/Kaiserghetto/Pictures/2021-Novemberd/IMG_5564 (2).JPG' (photoexporter.py: 994)
Traceback (most recent call last):
  File "/Users/kaiserghetto/.local/pipx/venvs/osxphotos/lib/python3.12/site-packages/osxphotos/fileutil.py", line 308, in copy
    shutil.copy(str(src), str(dest))
  File "/usr/local/Cellar/python@3.12/3.12.1/Frameworks/Python.framework/Versions/3.12/lib/python3.12/shutil.py", line 424, in copy
    copymode(src, dst, follow_symlinks=follow_symlinks)
  File "/usr/local/Cellar/python@3.12/3.12.1/Frameworks/Python.framework/Versions/3.12/lib/python3.12/shutil.py", line 313, in copymode
    chmod_func(dst, stat.S_IMODE(st.st_mode))
PermissionError: [Errno 13] Permission denied: '/Volumes/Kaiserghetto/Pictures/2021-Novemberd/IMG_5564 (2).JPG'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/Users/kaiserghetto/.local/pipx/venvs/osxphotos/lib/python3.12/site-packages/osxphotos/photoexporter.py", line 988, in _export_photo
    fileutil.copy(src, dest_str)
  File "/Users/kaiserghetto/.local/pipx/venvs/osxphotos/lib/python3.12/site-packages/osxphotos/fileutil.py", line 310, in copy
    raise OSError(f"Error copying {src} to {dest}: {e}") from e
OSError: Error copying /private/tmp/osxphotos_export_ymmbv8xd/2381A705-1226-4BF7-8664-407C66E27209_exiftool.jpeg to /Volumes/Kaiserghetto/Pictures/2021-Novemberd/IMG_5564 (2).JPG: [Errno 13] Permission denied: '/Volumes/Kaiserghetto/Pictures/2021-Novemberd/IMG_5564 (2).JPG'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/Users/kaiserghetto/.local/pipx/venvs/osxphotos/lib/python3.12/site-packages/osxphotos/crash_reporter.py", line 79, in wrapped
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/Users/kaiserghetto/.local/pipx/venvs/osxphotos/lib/python3.12/site-packages/osxphotos/cli/export.py", line 1096, in export
    return_code = export_cli(**locals())
                  ^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/kaiserghetto/.local/pipx/venvs/osxphotos/lib/python3.12/site-packages/osxphotos/cli/export.py", line 1937, in export_cli
    export_results = export_photo(**kwargs)
                     ^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/kaiserghetto/.local/pipx/venvs/osxphotos/lib/python3.12/site-packages/osxphotos/cli/export.py", line 2447, in export_photo
    results += export_photo_to_directory(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/kaiserghetto/.local/pipx/venvs/osxphotos/lib/python3.12/site-packages/osxphotos/cli/export.py", line 2794, in export_photo_to_directory
    raise e
  File "/Users/kaiserghetto/.local/pipx/venvs/osxphotos/lib/python3.12/site-packages/osxphotos/cli/export.py", line 2768, in export_photo_to_directory
    export_results = exporter.export(
                     ^^^^^^^^^^^^^^^^
  File "/Users/kaiserghetto/.local/pipx/venvs/osxphotos/lib/python3.12/site-packages/osxphotos/photoexporter.py", line 253, in export
    all_results += self._export_photo(
                   ^^^^^^^^^^^^^^^^^^^
  File "/Users/kaiserghetto/.local/pipx/venvs/osxphotos/lib/python3.12/site-packages/osxphotos/photoexporter.py", line 993, in _export_photo
    raise ExportError(
osxphotos.photoexporter.ExportError: Error copying file /private/tmp/osxphotos_export_ymmbv8xd/2381A705-1226-4BF7-8664-407C66E27209_exiftool.jpeg to /Volumes/Kaiserghetto/Pictures/2021-Novemberd/IMG_5564 (2).JPG: Error copying /private/tmp/osxphotos_export_ymmbv8xd/2381A705-1226-4BF7-8664-407C66E27209_exiftool.jpeg to /Volumes/Kaiserghetto/Pictures/2021-Novemberd/IMG_5564 (2).JPG: [Errno 13] Permission denied: '/Volumes/Kaiserghetto/Pictures/2021-Novemberd/IMG_5564 (2).JPG' (photoexporter.py: 994)
RhetTbull commented 6 months ago

This definitely looks like a permission issue but not sure why it happens only when exiftool is used. Try adding --alt-copy to the options and do another attempt on the NAS.

kaiserghetto commented 6 months ago

Same. Even with --alt-copy. I think I'll just export locally and then move to the NAS.

osxphotos crash log
Created: 2023-12-29 11:54:18.319917
osxphotos version: 0.67.0
Platform: macOS-13.6.1-x86_64-i386-64bit
Python version: 3.12.1 (main, Dec  8 2023, 19:21:52) [Clang 14.0.3 (clang-1403.0.22.14.1)]
sys.argv: ['/Users/kaiserghetto/.local/bin/osxphotos', '--debug', 'export', '--name', 'IMG_5564.JPG', '/Volumes/Kaiserghetto/Pictures/', '--directory', '{created.year}-{created.month}2', '--exiftool', '--tmpdir', '/private/tmp', '--alt-copy']
CRASH_DATA:
locals: {'dest': '/Volumes/Kaiserghetto/Pictures/', 'db': None, 'add_exported_to_album': None, 'add_missing_to_album': None, 'add_skipped_to_album': None, 'added_after': None, 'added_before': None, 'added_in_last': None, 'album': (), 'album_keyword': False, 'alt_db': None, 'alt_copy': True, 'append': False, 'beta': False, 'burst': False, 'checkpoint': None, 'cleanup': False, 'cloudasset': False, 'config_only': False, 'convert_to_jpeg': False, 'crash_after': None, 'current_name': False, 'deleted': False, 'deleted_only': False, 'description': (), 'description_template': None, 'directory': '{created.year}-{created.month}2', 'download_missing': False, 'dry_run': False, 'duplicate': False, 'edited': False, 'edited_suffix': None, 'exif': (), 'exiftool': True, 'exiftool_merge_keywords': False, 'exiftool_merge_persons': False, 'exiftool_option': (), 'exiftool_path': None, 'export_as_hardlink': False, 'export_by_date': False, 'exportdb': None, 'external_edit': False, 'favorite': False, 'favorite_rating': False, 'filename_template': None, 'finder_tag_keywords': False, 'finder_tag_template': (), 'folder': (), 'force_update': False, 'from_date': None, 'from_time': None, 'has_comment': False, 'has_likes': False, 'has_raw': False, 'hdr': False, 'hidden': False, 'ignore_case': False, 'ignore_date_modified': False, 'ignore_exportdb': False, 'ignore_signature': False, 'in_album': False, 'incloud': False, 'is_reference': False, 'jpeg_ext': None, 'jpeg_quality': None, 'keep': (), 'keyword': (), 'keyword_template': (), 'label': (), 'limit': None, 'live': False, 'load_config': None, 'location': False, 'max_size': None, 'min_size': None, 'missing': False, 'name': ('IMG_5564.JPG',), 'no_comment': False, 'no_description': False, 'no_exportdb': False, 'no_keyword': False, 'no_likes': False, 'no_location': False, 'no_place': False, 'no_progress': False, 'no_title': False, 'not_burst': False, 'not_cloudasset': False, 'not_edited': False, 'not_favorite': False, 'not_hdr': False, 'not_hidden': False, 'not_in_album': False, 'not_incloud': False, 'not_live': False, 'not_missing': False, 'not_panorama': False, 'not_portrait': False, 'not_reference': False, 'not_screenshot': False, 'not_selfie': False, 'not_shared': False, 'not_slow_mo': False, 'not_time_lapse': False, 'only_movies': False, 'only_new': False, 'only_photos': False, 'original_suffix': None, 'overwrite': False, 'panorama': False, 'person': (), 'person_keyword': False, 'place': (), 'portrait': False, 'post_command': (), 'post_command_error': None, 'post_function': (), 'preview': False, 'preview_if_missing': False, 'preview_suffix': None, 'print_template': (), 'query_eval': (), 'query_function': (), 'ramdb': False, 'regex': (), 'replace_keywords': False, 'report': None, 'retry': None, 'save_config': None, 'screenshot': False, 'selfie': False, 'shared': False, 'export_aae': False, 'sidecar': (), 'sidecar_drop_ext': False, 'sidecar_template': (), 'skip_bursts': False, 'skip_edited': False, 'skip_live': False, 'skip_original_if_edited': False, 'skip_raw': False, 'skip_uuid': (), 'skip_uuid_from_file': None, 'slow_mo': False, 'strip': False, 'theme': None, 'time_lapse': False, 'timestamp': False, 'title': (), 'tmpdir': '/private/tmp', 'to_date': None, 'to_time': None, 'touch_file': False, 'update': False, 'update_errors': False, 'use_photokit': False, 'use_photos_export': False, 'uti': None, 'uuid': (), 'uuid_from_file': None, 'verbose_flag': 0, 'xattr_template': (), 'year': (), 'syndicated': False, 'not_syndicated': False, 'saved_to_library': False, 'not_saved_to_library': False, 'shared_moment': False, 'not_shared_moment': False, 'shared_library': False, 'not_shared_library': False, 'selected': False, 'ctx': <click.core.Context object at 0x10c86f3e0>, 'cli_obj': <osxphotos.cli.cli.CLI_Obj object at 0x10562a3c0>}
osxphotos version: 0.67.0
Error: Error copying file /private/tmp/osxphotos_export_gmj0mar2/2381A705-1226-4BF7-8664-407C66E27209_exiftool.jpeg to /Volumes/Kaiserghetto/Pictures/2021-November2/IMG_5564.JPG: Error copying /private/tmp/osxphotos_export_gmj0mar2/2381A705-1226-4BF7-8664-407C66E27209_exiftool.jpeg to /Volumes/Kaiserghetto/Pictures/2021-November2/IMG_5564.JPG: [Errno 13] Permission denied: '/Volumes/Kaiserghetto/Pictures/2021-November2/IMG_5564.JPG' (photoexporter.py: 994)
Traceback (most recent call last):
  File "/Users/kaiserghetto/.local/pipx/venvs/osxphotos/lib/python3.12/site-packages/osxphotos/fileutil.py", line 308, in copy
    shutil.copy(str(src), str(dest))
  File "/usr/local/Cellar/python@3.12/3.12.1/Frameworks/Python.framework/Versions/3.12/lib/python3.12/shutil.py", line 424, in copy
    copymode(src, dst, follow_symlinks=follow_symlinks)
  File "/usr/local/Cellar/python@3.12/3.12.1/Frameworks/Python.framework/Versions/3.12/lib/python3.12/shutil.py", line 313, in copymode
    chmod_func(dst, stat.S_IMODE(st.st_mode))
PermissionError: [Errno 13] Permission denied: '/Volumes/Kaiserghetto/Pictures/2021-November2/IMG_5564.JPG'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/Users/kaiserghetto/.local/pipx/venvs/osxphotos/lib/python3.12/site-packages/osxphotos/photoexporter.py", line 988, in _export_photo
    fileutil.copy(src, dest_str)
  File "/Users/kaiserghetto/.local/pipx/venvs/osxphotos/lib/python3.12/site-packages/osxphotos/fileutil.py", line 310, in copy
    raise OSError(f"Error copying {src} to {dest}: {e}") from e
OSError: Error copying /private/tmp/osxphotos_export_gmj0mar2/2381A705-1226-4BF7-8664-407C66E27209_exiftool.jpeg to /Volumes/Kaiserghetto/Pictures/2021-November2/IMG_5564.JPG: [Errno 13] Permission denied: '/Volumes/Kaiserghetto/Pictures/2021-November2/IMG_5564.JPG'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/Users/kaiserghetto/.local/pipx/venvs/osxphotos/lib/python3.12/site-packages/osxphotos/crash_reporter.py", line 79, in wrapped
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/Users/kaiserghetto/.local/pipx/venvs/osxphotos/lib/python3.12/site-packages/osxphotos/cli/export.py", line 1096, in export
    return_code = export_cli(**locals())
                  ^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/kaiserghetto/.local/pipx/venvs/osxphotos/lib/python3.12/site-packages/osxphotos/cli/export.py", line 1937, in export_cli
    export_results = export_photo(**kwargs)
                     ^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/kaiserghetto/.local/pipx/venvs/osxphotos/lib/python3.12/site-packages/osxphotos/cli/export.py", line 2447, in export_photo
    results += export_photo_to_directory(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/kaiserghetto/.local/pipx/venvs/osxphotos/lib/python3.12/site-packages/osxphotos/cli/export.py", line 2794, in export_photo_to_directory
    raise e
  File "/Users/kaiserghetto/.local/pipx/venvs/osxphotos/lib/python3.12/site-packages/osxphotos/cli/export.py", line 2768, in export_photo_to_directory
    export_results = exporter.export(
                     ^^^^^^^^^^^^^^^^
  File "/Users/kaiserghetto/.local/pipx/venvs/osxphotos/lib/python3.12/site-packages/osxphotos/photoexporter.py", line 253, in export
    all_results += self._export_photo(
                   ^^^^^^^^^^^^^^^^^^^
  File "/Users/kaiserghetto/.local/pipx/venvs/osxphotos/lib/python3.12/site-packages/osxphotos/photoexporter.py", line 993, in _export_photo
    raise ExportError(
osxphotos.photoexporter.ExportError: Error copying file /private/tmp/osxphotos_export_gmj0mar2/2381A705-1226-4BF7-8664-407C66E27209_exiftool.jpeg to /Volumes/Kaiserghetto/Pictures/2021-November2/IMG_5564.JPG: Error copying /private/tmp/osxphotos_export_gmj0mar2/2381A705-1226-4BF7-8664-407C66E27209_exiftool.jpeg to /Volumes/Kaiserghetto/Pictures/2021-November2/IMG_5564.JPG: [Errno 13] Permission denied: '/Volumes/Kaiserghetto/Pictures/2021-November2/IMG_5564.JPG' (photoexporter.py: 994)
RhetTbull commented 6 months ago

I can't figure out why this should fail like this. How did you install exiftool? One option might be to reinstall exiftool in case it's an issue of exiftool's permissions to access the NAS. Sorry I can't offer much more help from the osxphotos perspective.

RhetTbull commented 4 weeks ago

Are you still having an issue with this? I've not been able to reproduce this problem.