Closed innoreq closed 2 years ago
What's the full command line you're using for export?
This isn't an osxphotos error, it's one that osxphotos is catching and reporting from the OS. I'm not sure the cause but will look into it.
Oh, sorry, totally forgot that thing:
osxphotos export
Some more stuff from the most recent run on a different library:
2021-06-04 12:10:20,759 - WARNING - photosdb.py - 97 - WARNING: This module has only been tested with macOS versions [10.12, 10.13, 10.14, 10.15, 10.16, 11.0, 11.1, 11.2, 11.3]: you have Darwin, OS version: 11.4 WARNING: Only tested on database versions [6000, 4025, 4016, 3301, 2622] You have database version=5001 which has not been tested Exporting 32167 photos to /Volumes/P03c Bilder/Export xxx…x [------------------------------------] 0% Traceback (most recent call last): File "/Users/xxx/.local/pipx/venvs/osxphotos/lib/python3.9/site-packages/osxphotos/photoinfo/photoinfo.py", line 217, in path_edited return self._path_edited AttributeError: 'PhotoInfo' object has no attribute '_path_edited'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/xxx/.local/bin/osxphotos", line 8, in
Thanks -- that's helpful.
On the command line, I assume you're actually including the path to the Photos library (otherwise you should get an error):
osxphotos export --db --directory "{created.year}/{place.name.country}" --update --sidecar XMP
should be
osxphotos export --db /path/to/library --directory "{created.year}/{place.name.country}" --update --sidecar XMP
WARNING: Only tested on database versions [6000, 4025, 4016, 3301, 2622] You have database version=5001
It appears you've got a Photos database version that I've never seen in my testing (which has covered 10.12 through 11.3). (and thus my earlier comment about this not being an osxphotos error was wrong). Do you know which version of macOS these were created on? I'll need to see a copy of one of these databases or at least the schema to know if osxphotos can process these correctly. Please run these two commands and post the output here (they'll show only schema information, no actual personal details from your library):
sqlite3 ~/Pictures/Photos\ Library.photoslibrary/database/photos.db ".schema" > db_schema.txt
sqlite3 ~/Pictures/Photos\ Library.photoslibrary/database/photos.sqlite ".schema" > sqlite_schema.txt
In the commands above, replace ~/Pictures/Photos\ Library.photoslibrary/
with the path to the library that's causing the error.
yeah, sure. I applied placeholders in greater-and-smaller-than-brackets, but the GitHub editor seems to have eaten that... Another info: I just downgraded to BigSur release (not beta), but that didn't change the problem.
See also #102 I need to see the schema for one of these "version 5001" databases to know which queries to use against these databases.
@innoreq If you can run the two sqlite3 commands above, I should have enough data to fix this. I think it's a relatively easy fix but need to see the schema of this particular Photos library format.
I'm trying to export several photos libraries using osxphotos. While the very first library could be exported without problems, the second one throws many (!) of these errors:
Error exporting photo (281500D0-AB76-47B7-BC1F-3B50CFCF49B6: DHAT9410.JPG) as DHAT9410.JPG: Wrong database format!
However, some pictures are in fact exported. I did a photos library repair (ALT-CMD-Start), but this had no effect.
osxphotos version: 0.42.28 macos version: 11.4 Beta (20F5046g) photos version: 6.0 (350.0.100)