Piexif: Can not dump exif_dict : dump got wrong type of exif value. 41729 in Exif IFD.
This issue is related to https://github.com/hMatoba/Piexif/issues/83. When I want to dump the modified exif dict into to exif bytes using the example here, I got the error:
ValueError: “dump” got wrong type of exif value. 41729 in Exif IFD. Got as <class ‘int’>.
After checking the source code a bit, I found that piexif expects this value in key 41729 in Exif IFD to be bytes instead of ints. So I change the value to bytes:
exif_dict['Exif'][41729] = b'1'
Then I can dump the exif dict without any error.
About this issue
- Original URL
- State: open
- Created 5 years ago
- Reactions: 8
- Comments: 15
I’m also having this issue. Would be nice to fix it. My workaround will be to simply drop this tag, which is useless anyway. Most images don’t even have it, and no modern ones do. Just some old ones I took with a crappy 1st gen smartphone in 2011 are tripping up my code.
Got the same issue. from the standard p.67 : http://www.cipa.jp/std/documents/e/DC-008-2012_E.pdf this tag has TYPE : undefined. So piexif should not expect exclusively a byte. I can make the workaround for this tag, but what if it happens with another tag ? Can we expect a patch for this ?