You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With a certain .jpg file,the str method of IdfTag returns a list of values. This causes an exception when I attempt to print the value of an EXIF tag. A short recreation program is attached along with the .jpg file causing the problem.
I can work around this problem very easily by replacing str(value) with str(value.str()), so nothing urgent from my point of view. Additionally, I'd be happy to have a go at providing a fix if you would be interested in taking it. I suspect the problem is in the bottom of the _process_tag method in classes.py after the comment <# compute printable version of values>.
This occurred on MacOS 11.2.3 running ExifRead 2.9.2 installed via pip and Python 3.9.2 installed via homebrew.
Here's the output from the recreation program showing the problem.
With a certain .jpg file,the str method of IdfTag returns a list of values. This causes an exception when I attempt to print the value of an EXIF tag. A short recreation program is attached along with the .jpg file causing the problem.
I can work around this problem very easily by replacing str(value) with str(value.str()), so nothing urgent from my point of view. Additionally, I'd be happy to have a go at providing a fix if you would be interested in taking it. I suspect the problem is in the bottom of the _process_tag method in classes.py after the comment <# compute printable version of values>.
This occurred on MacOS 11.2.3 running ExifRead 2.9.2 installed via pip and Python 3.9.2 installed via homebrew.
Here's the output from the recreation program showing the problem.
====> val.str() returns non-string <====
tag: MakerNote SpecialMode
type(val): <class 'exifread.classes.IfdTag'>
val.str(): [2290028546, 2317605138, 3584621556]
type(val.str()): <class 'list'>
len(val.str()) 3
val.str()[0] 2290028546
val.str()[1] 2317605138
val.str()[2] 3584621556
tag: MakerNote SpecialMode val: Traceback (most recent call last):
File "/Users/cornell/shr/pgm/jpeg-date-name/./bug-demo.py", line 21, in
print('tag:', tag, 'val:', val)
TypeError: str returned non-string (type list)
bug-demo.zip
The text was updated successfully, but these errors were encountered: