ivandokov / phockup

Media sorting tool to organize photos and videos from your camera in folders by year, month and day.
MIT License
847 stars 108 forks source link

[WARNING] - unsupported operand type(s) for +: 'NoneType' and 'datetime.timedelta' #220

Open andreaseberharter opened 10 months ago

andreaseberharter commented 10 months ago

Hey, thank you for this amazing software! I ran it over 1.7TB of photos and videos and after 2 days it stopped with the following error message:

[WARNING] - unsupported operand type(s) for +: 'NoneType' and 'datetime.timedelta'

I tried to find a solution, but have no idea what could be wrong.

I am on macOS Monterey 12.7.1 and installed via brew (had to run pip3 to install tqdm like described here #170). Version is: ~ % phockup -v v1.10.1

I can't the delete the source folder as I don't know which files have been successfully processed already.

Any help or pointer into the right direction would be very welcome. Andreas

ivandokov commented 10 months ago

The issue is related to this PR #181 Hopefully the author @wbison3 will be able to assist you in resolving the issue?

klauskiwi commented 8 months ago

Ivan is correct. I was hitting the same issue, and could succeed after reverting b836777.

The @wbison3 is that you assume that there will always be a DateTime if TimeZone is present, which might make sense, but it's a weak assumption. Should be easily fixed if you check for it on the conditional at line 62..

ivandokov commented 8 months ago

@klauskiwi can you submit a fix and cover the edge case with a test