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
2.14k stars 99 forks source link

can`t run osxphotos after killing it #1684

Open nbcjr opened 1 month ago

nbcjr commented 1 month ago

using latest version 0.68.5 I was running osxphotos on a very large database 140000 photos, mostly online.

Then osxphotos gives an error about disk space and stops running, not even Crtl-C could stop the app, had to kill the id.

Tried to rerun it, with --update, now it won`t start. I know log says I have run out of space, but that is not the case, I triple checked on my local disk and the destination as well.

osxphotos_crash.log

Filesystem Size Used Avail Capacity iused ifree %iused Mounted on /dev/disk3s1s1 460Gi 19Gi 24Gi 45% 404k 252M 0% / devfs 199Ki 199Ki 0Bi 100% 688 0 100% /dev

nbcjr commented 1 month ago

export command was run with --directory "{created.year}/{created.mm}-{created.month}/{place.name.country,{created.dd}}" --exiftool --touch-file --strip --verbose --download-missing --use-photokit --filename "{created.date}{created.hour}{created.min}{created.sec}{place.name.city}_{original_name}{favorite?_favorite,}" --retry 3 --update --verbose

oPromessa commented 1 month ago

Hello @nbcjr. Yes, crash log does indicate::

sqlite3.OperationalError: database or disk is full

Diagnose

osxphotos is trying to open the osxphotos export database named .osxphotos_export.db which osxphotos is trying to read in order to be able to continue but it can't.

I see the output of your df. Just to double check, the destination folder '/Volumes/raiz/osxphotosexport' is on that same internal disk (raiz)?

FYI... my 106K Photos is currently using a 2GB .osxphotos_export.db

Recommendations

  1. Do you see if the file '/Volumes/raiz/osxphotosexport/.osxphotos_export.db' exists and, if you have sqlite3 command utility available. if you can open it and run:

    $ sqlite3 /Volumes/raiz/osxphotosexport/.osxphotos_export.db
    SQLite version 3.37.0 2021-12-09 01:34:53
    Enter ".help" for usage hints.
    sqlite> SELECT osxphotos, exportdb, max(id) FROM version;
    0.68.5|10.0|1
    sqlite> .quit
    $
  2. Other than that, this post sqlite3.OperationalError: database or disk is full makes several recommendations on lack of disk space in other areas like TEMP and not the main disk.

oPromessa commented 1 month ago

@nbcjr , were you able to make it work?