-
Notifications
You must be signed in to change notification settings - Fork 96
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Raise error if export() with missing asset #1598
Comments
Is the original image missing? |
If you don't set edited=True, it exports the original (it's one or the other). If original is missing it would export nothing (and return empty list). Perhaps it should raise FileNotFound but that's how it's implemented at the moment. Its incumbent on the user to ensure the original is present. |
thank you so much @RhetTbull ! this worked: photo.export("/Users/srinivas/Desktop/test","photo_name.jpg",edited=True,) may i suggest changing the behavior to error out if no photo was exported? |
@sg-s you might also find PhotoExporter useful. This is the class that |
Do you want a PR? |
Sure, happy to accept a PR if you want to work on. If you implement this, do not change the behavior of The two places you'll need to modify are the return statements in Please add a test to verify the result (either in a new file or in The photo with UUID Unfortunately the iPhoto test library does not have a missing photo so a test cannot be created for iPhoto. Please also update the |
Describe the bug
I can't export photos to disk using photo.export(), and it does not do anything and no error is thrown
To Reproduce
Steps to reproduce the behavior:
Expected behavior
A jpg file to be created.
instead, nothing happens at all.
Screenshots
Desktop (please complete the following information):
osxphotos --version
)Additional context
However, I can "export" by reading
photos.path_edited
and simply copying that:The text was updated successfully, but these errors were encountered: