dogsheep-photos
dogsheep-photos copied to clipboard
Update for Big Sur
Refactored out the SQL for extracting aesthetic scores to use osxphotos -- adds compatbility for Big Sur via osxphotos which has been updated for new table names in Big Sur. Have not yet refactored the SQL for extracting labels which is still compatible with Big Sur.
Fixes the issue mentioned here: https://github.com/dogsheep/dogsheep-photos/issues/15#issuecomment-748436115
👋 could I help somehow for this to be merged? As Big Sur is going to be more used as the time goes I think it would be nice to merge and publish a new version. Nice work!
I would love this merged!
👋 Any update on getting this merged?
Alternatively, is there a work around for this issue to unblock myself?
edit to add: huge fan of both this project and osxphotos
, thanks so much for your work here 🙏 If I had any experience with Python I would offer to help but somehow I've managed to not write any Python in 10+ years of programming 😅
Edit again to add:
Alternatively, is there a work around for this issue to unblock myself?
Yes, there is. I was able to apply the patch of this PR and it applies (mostly) cleanly and works.
- verified I have a high enough version of
osxphotos
- downloaded the .patch of this (by appending
.patch
to the URL) - edited the patch to remove the
setup.py
changes -
cd
to the directory containingdogsheep-photos
andgit apply 31.patch
I just tried this branch and saw some errors.
I installed this PR locally with:
pip install https://github.com/RhetTbull/dogsheep-photos/archive/update_for_bigsur.zip
System Details
OS: MacOS Monterey Python Version: Python 3.10.8
Stacktrace
Traceback (most recent call last):
File "/Users/df/.venvs/photo-experiments/bin/dogsheep-photos", line 8, in <module>
sys.exit(cli())
File "/Users/df/.venvs/photo-experiments/lib/python3.10/site-packages/click/core.py", line 1130, in __call__
return self.main(*args, **kwargs)
File "/Users/df/.venvs/photo-experiments/lib/python3.10/site-packages/click/core.py", line 1055, in main
rv = self.invoke(ctx)
File "/Users/df/.venvs/photo-experiments/lib/python3.10/site-packages/click/core.py", line 1657, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/Users/df/.venvs/photo-experiments/lib/python3.10/site-packages/click/core.py", line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/Users/df/.venvs/photo-experiments/lib/python3.10/site-packages/click/core.py", line 760, in invoke
return __callback(*args, **kwargs)
File "/Users/df/.venvs/photo-experiments/lib/python3.10/site-packages/dogsheep_photos/cli.py", line 254, in apple_photos
sha256 = calculate_hash(pathlib.Path(photo.path))
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/pathlib.py", line 960, in __new__
self = cls._from_parts(args)
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/pathlib.py", line 594, in _from_parts
drv, root, parts = self._parse_args(args)
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/pathlib.py", line 578, in _parse_args
a = os.fspath(a)
TypeError: expected str, bytes or os.PathLike object, not NoneType
+1 to getting this merged down.
For future googlers, I installed by...
git clone [email protected]:RhetTbull/dogsheep-photos.git
cd dogsheep-photos
git checkout update_for_bigsur
python setup.py install
You can also install this with pip using this oneliner:
pip install git+https://github.com/RhetTbull/dogsheep-photos.git@update_for_bigsur