jim-easterbrook / Photini

An easy to use digital photograph metadata (Exif, IPTC, XMP) editing application.
https://photini.readthedocs.io/
GNU General Public License v3.0
163 stars 24 forks source link

Error when scanning for files with an error about invald metadada #45

Closed aseques closed 5 years ago

aseques commented 5 years ago

When scanning in a photo folder for my files, there's a message that I assume it's for several of my files that have broken (or not recognized) metadata years. Maybe if the error show the file I could fix it with another program or remove it if corrupted.

16:43:08: ERROR: photini.metadata: time data ';$\x85L' does not match format '%Y'
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/dist-packages/photini/metadata.py", line 1614, in __getattr__
    new_value = self._data_type[name].read(handler, tag)
  File "/usr/local/lib/python3.7/dist-packages/photini/metadata.py", line 582, in read
    return cls.from_exif(file_value)
  File "/usr/local/lib/python3.7/dist-packages/photini/metadata.py", line 623, in from_exif
    return cls.from_ISO_8601(datetime_string)
  File "/usr/local/lib/python3.7/dist-packages/photini/metadata.py", line 550, in from_ISO_8601
    (datetime.strptime(datetime_string, fmt), precision, tz_offset))
  File "/usr/lib/python3.7/_strptime.py", line 577, in _strptime_datetime
    tt, fraction, gmtoff_fraction = _strptime(data_string, format)
  File "/usr/lib/python3.7/_strptime.py", line 359, in _strptime
    (data_string, format))
ValueError: time data ';$\x85L' does not match format '%Y'
16:43:43: ERROR: photini.metadata: time data ';$\x85L' does not match format '%Y'
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/dist-packages/photini/metadata.py", line 1614, in __getattr__
    new_value = self._data_type[name].read(handler, tag)
  File "/usr/local/lib/python3.7/dist-packages/photini/metadata.py", line 582, in read
    return cls.from_exif(file_value)
  File "/usr/local/lib/python3.7/dist-packages/photini/metadata.py", line 623, in from_exif
    return cls.from_ISO_8601(datetime_string)
  File "/usr/local/lib/python3.7/dist-packages/photini/metadata.py", line 550, in from_ISO_8601
    (datetime.strptime(datetime_string, fmt), precision, tz_offset))
  File "/usr/lib/python3.7/_strptime.py", line 577, in _strptime_datetime
    tt, fraction, gmtoff_fraction = _strptime(data_string, format)
  File "/usr/lib/python3.7/_strptime.py", line 359, in _strptime
    (data_string, format))
ValueError: time data ';$\x85L' does not match format '%Y'
16:44:08: ERROR: photini.metadata: time data ';$\x85L' does not match format '%Y'
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/dist-packages/photini/metadata.py", line 1614, in __getattr__
    new_value = self._data_type[name].read(handler, tag)
  File "/usr/local/lib/python3.7/dist-packages/photini/metadata.py", line 582, in read
    return cls.from_exif(file_value)
  File "/usr/local/lib/python3.7/dist-packages/photini/metadata.py", line 623, in from_exif
    return cls.from_ISO_8601(datetime_string)
  File "/usr/local/lib/python3.7/dist-packages/photini/metadata.py", line 550, in from_ISO_8601
    (datetime.strptime(datetime_string, fmt), precision, tz_offset))
  File "/usr/lib/python3.7/_strptime.py", line 577, in _strptime_datetime
    tt, fraction, gmtoff_fraction = _strptime(data_string, format)
  File "/usr/lib/python3.7/_strptime.py", line 359, in _strptime
    (data_string, format))
ValueError: time data ';$\x85L' does not match format '%Y'
jim-easterbrook commented 5 years ago

Definitely broken! Photini should be able to repair the files though. If you switch to the "technical" tab and step through your files the ones with a missing date should be obvious. Or is Photini failing to copy the files in the first place? The traceback suggests it's not handling the malformed data.

jim-easterbrook commented 5 years ago

If you find which of your files is causing the problems I'd like to have a copy. I like to have a set of problem files for testing.

aseques commented 5 years ago

Unfortunately I delete the photos from the source, viewing the changes you published I will have an eye for the error on the next time. Thanks again for your attention.