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

Issue with some files "ValueError: "dump" got wrong type of exif value. 37500 in Exif IFD. Got as <class 'tuple'>" #5

Open
Mottysc opened this issue Mar 13, 2023 · 0 comments

Comments

@Mottysc
Copy link

Mottysc commented Mar 13, 2023

I'm not sure why I'm getting this error when I run the code. What helps is if I find the file in question and then "resize" the file (but putting 100% in the dimensions so I'm not actually resizing it).

Traceback (most recent call last):
  File "[python]\lib\site-packages\piexif\_dump.py", line 267, in _value_to_bytes
    four_bytes_over = b"" + raw_value
TypeError: can't concat tuple to bytes

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "[python]\lib\site-packages\piexif\_dump.py", line 335, in _dict_to_bytes
    length_str, value_str, four_bytes_over = _value_to_bytes(raw_value,
  File "[python]\lib\site-packages\piexif\_dump.py", line 269, in _value_to_bytes
    raise ValueError("Got invalid type to convert.")
ValueError: Got invalid type to convert.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "D:\Photos\google-metadata-matcher-master\google-metadata-matcher-master\src\merge_metadata.py", line 26, in <module>
    processFolder(args.source_folder, args.edited_word, args.optimize, args.output_folder, args.max_dimension)
  File "D:\Photos\google-metadata-matcher-master\google-metadata-matcher-master\src\process_folder.py", line 96, in processFolder
    new_exif = adjust_exif(image.info["exif"], metadata)
  File "D:\Photos\google-metadata-matcher-master\google-metadata-matcher-master\src\auxFunctions.py", line 135, in adjust_exif
    return piexif.dump(exif_dict)
  File "[python]\lib\site-packages\piexif\_dump.py", line 68, in dump
    exif_set = _dict_to_bytes(exif_ifd, "Exif", zeroth_length)
  File "[python]\lib\site-packages\piexif\_dump.py", line 339, in _dict_to_bytes
    raise ValueError(
ValueError: "dump" got wrong type of exif value.
37500 in Exif IFD. Got as <class 'tuple'>.
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