Skip to content
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

piexif.dump issue ***struct.error: ubyte format requires 0 <= number <= 255 #120

Open
Mostafa-Nakhaei opened this issue Sep 4, 2021 · 0 comments

Comments

@Mostafa-Nakhaei
Copy link

as simple as the following code, I get the error:

exif_dict = piexif.load(filename)
exif_bytes = piexif.dump(exif_dict)

error I get:
*** struct.error: ubyte format requires 0 <= number <= 255

Reason:
exif_dict["GPS"][5] is 256 in my photo but the format enforces byte!
I tried to evaluate the exif_dict["GPS"][5] to a tuple ( e.g. (256,) ) but the same issue persisted.

I use python 3.6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant