ivandokov/phockup

Creating parsed_date object fails for unknown reason. NoneType object is assigned instead.

mschloesser opened this issue · 1 comments

I experienced the following error twice while organizing a ~100 GB photo library.
Unfortunately, I deleted the images so I cannot provide you with test samples.

It looks like that creating the parsed_date object failed for some reason.

pictures/IMG_2226.JPGTraceback (most recent call last):
File "/usr/local/bin/phockup", line 88, in
main(sys.argv[1:])
File "/usr/local/bin/phockup", line 82, in main
timestamp=timestamp
File "/usr/local/Cellar/phockup/1.5.6/src/phockup.py", line 36, in init
self.walk_directory()
File "/usr/local/Cellar/phockup/1.5.6/src/phockup.py", line 67, in walk_directory
self.process_file(file)
File "/usr/local/Cellar/phockup/1.5.6/src/phockup.py", line 144, in process_file
output, target_file_name, target_file_path = self.get_file_name_and_path(file)
File "/usr/local/Cellar/phockup/1.5.6/src/phockup.py", line 184, in get_file_name_and_path
date = Date(file).from_exif(exif_data, self.timestamp, self.date_regex)
File "/usr/local/Cellar/phockup/1.5.6/src/date.py", line 48, in from_exif
if parsed_date.get("date") is not None:
AttributeError: 'NoneType' object has no attribute 'get'

Apart from that the tool worked like a charm, so thanks for sharing!

Must be resolved now by version 1.5.7