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

struct.error: ubyte format requires 0 <= number <= 255. #130

Open
ZTFtrue opened this issue Feb 5, 2022 · 0 comments
Open

struct.error: ubyte format requires 0 <= number <= 255. #130

ZTFtrue opened this issue Feb 5, 2022 · 0 comments

Comments

@ZTFtrue
Copy link

ZTFtrue commented Feb 5, 2022

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

The GPS message maybe have an error. Other image tools don't show GPS messages. this is picture.

Now I use this, it worked for me.

if gps_is:
        try:
            gps_set = _dict_to_bytes(gps_ifd, "GPS", zeroth_length + exif_length)
            gps_bytes = b"".join(gps_set)
            gps_length = len(gps_bytes)
        except Exception as e:
            print('GPS error')
        finally:
            gps_bytes = b""
            gps_length = 0
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