New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can not dump exif_dict : dump got wrong type of exif value. 41729 in Exif IFD. #95
Comments
Same issue here. |
SUKA !@ SAME HERE LOL :( |
I get a similar issue for Exif tag code 41988, but changing it to bytes I get same error. It looks like it's supposed to be a rational type... but I didn't think that was really a class in python. Any ideas for a workaround? Thanks. |
@nkacoroski you may have to check the source code and see what data type it expects. |
@jdhao How do I do that? |
@nkacoroski Read the relevant source code of piexif and run your code with a debugger to see where it fails. Then you should be able to see what data type it expects. |
Okay, thank you! |
Got the same issue. |
What's a good workaround for this? I literally can't run the example code on my images.
I don't fully understand what's going on in |
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. # "dump" got wrong type of exif value.\n41729 in Exif IFD. Got as <class \'int\'>.
# See bug https://github.com/hMatoba/Piexif/issues/95
try:
del newexif['Exif'][piexif.ExifIFD.SceneType]
except:
pass |
Maybe |
well, does it work for you? |
Bumping this, is there any progress on the issue? |
This should help
|
I was facing the same problem, despite also loading through piexif. The solution for me was to extract exif data BEFORE applying any changes to PIL.Image from which it was taken. Otherwise PIL would decode data in it's own format, which causes this error |
This issue is related to #83. When I want to dump the modified exif dict into to exif bytes using the example here, I got the error:
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:
Then I can dump the exif dict without any error.
The text was updated successfully, but these errors were encountered: