Skip to content

Import fails due to no file path - Shared Albums in Apple Photos ( #43

@mdav43

Description

@mdav43

Believe this is due to in ability to read full path on photos in shared album

MacOS 15.3.1 (24D70)
Python 3.13

filename: 8ACC6113-8746-4E00-93A0-C6DF502DE327.JPG
original_filename: IMG_6871.HEIC
date: '2024-10-24T23:59:48+00:00'
description: null
title: null
keywords: []
albums:
- Flinders Ranges 2024
persons: []
path: null
ismissing: true
hasadjustments: false
external_edit: false
favorite: false
hidden: false
latitude: null
longitude: null
path_edited: null
shared: true
isphoto: true
ismovie: false
uti: public.jpeg
burst: false
live_photo: true
path_live_photo: null
iscloudasset: true
incloud: null
date_modified: null
portrait: false
screenshot: false
screen_recording: false
slow_mo: false
time_lapse: false
hdr: false
selfie: false
panorama: false
has_raw: false
uti_raw: null
path_raw: null
place: null
exif: ExifInfo(flash_fired=False, iso=50, metering_mode=5, sample_rate=None, track_format=None,
  white_balance=0, aperture=1.6, bit_rate=None, duration=None, exposure_bias=0.0,
  focal_length=5.1, fps=None, latitude=None, longitude=None, shutter_speed=0.00026702,
  camera_make='Apple', camera_model='iPhone 13', codec=None, lens_model='iPhone 13
  back dual wide camera 5.1mm f/1.6', date=datetime.datetime(2024, 10, 25, 10, 29,
  48, 868000, tzinfo=datetime.timezone(datetime.timedelta(seconds=37800))), tzoffset=37800,
  tzname='GMT+1030')
score: ScoreInfo(overall=0.0, curation=0.0, promotion=0.0, highlight_visibility=0.0,
  behavioral=0.0, failure=0.0, harmonious_color=0.0, immersiveness=0.0, interaction=0.0,
  interesting_subject=0.0, intrusive_object_presence=0.0, lively_color=0.0, low_light=0.0,
  noise=0.0, pleasant_camera_tilt=0.0, pleasant_composition=0.0, pleasant_lighting=0.0,
  pleasant_pattern=0.0, pleasant_perspective=0.0, pleasant_post_processing=0.0, pleasant_reflection=0.0,
  pleasant_symmetry=0.0, sharply_focused_subject=0.0, tastefully_blurred=0.0, well_chosen_subject=0.0,
  well_framed_subject=0.0, well_timed_shot=0.0)
intrash: false
height: 1905
width: 2049
orientation: 1
original_height: 1905
original_width: 2049
original_orientation: 1
original_filesize: 1589351

  [------------------------------------]    0%  00:56:18
Traceback (most recent call last):
  File "/Users/m/code/2025/dog-sheep-test/.venv/bin/dogsheep-photos", line 8, in <module>
    sys.exit(cli())
             ~~~^^
  File "/Users/m/code/2025/dog-sheep-test/.venv/lib/python3.13/site-packages/click/core.py", line 1161, in __call__
    return self.main(*args, **kwargs)
           ~~~~~~~~~^^^^^^^^^^^^^^^^^
  File "/Users/m/code/2025/dog-sheep-test/.venv/lib/python3.13/site-packages/click/core.py", line 1082, in main
    rv = self.invoke(ctx)
  File "/Users/m/code/2025/dog-sheep-test/.venv/lib/python3.13/site-packages/click/core.py", line 1697, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
                           ~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^
  File "/Users/m/code/2025/dog-sheep-test/.venv/lib/python3.13/site-packages/click/core.py", line 1443, in invoke
    return ctx.invoke(self.callback, **ctx.params)
           ~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/m/code/2025/dog-sheep-test/.venv/lib/python3.13/site-packages/click/core.py", line 788, in invoke
    return __callback(*args, **kwargs)
  File "/Users/m/code/2025/dog-sheep-test/.venv/lib/python3.13/site-packages/dogsheep_photos/cli.py", line 254, in apple_photos
    sha256 = calculate_hash(pathlib.Path(photo.path))
                            ~~~~~~~~~~~~^^^^^^^^^^^^
  File "/Users/m/.local/share/uv/python/cpython-3.13.0-macos-aarch64-none/lib/python3.13/pathlib/_local.py", line 503, in __init__
    super().__init__(*args)
    ~~~~~~~~~~~~~~~~^^^^^^^
  File "/Users/m/.local/share/uv/python/cpython-3.13.0-macos-aarch64-none/lib/python3.13/pathlib/_local.py", line 132, in __init__
    raise TypeError(
    ...<2 lines>...
        f"not {type(path).__name__!r}")
TypeError: argument should be a str or an os.PathLike object where __fspath__ returns a str, not 'NoneType'
```

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions