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

Errors in EXIF processing #482

Closed
blaueente opened this issue Dec 12, 2021 · 2 comments · Fixed by #489
Closed

Errors in EXIF processing #482

blaueente opened this issue Dec 12, 2021 · 2 comments · Fixed by #489

Comments

@blaueente
Copy link

I just updated using the recommended
python3 -m pip install --upgrade git+https://github.com/mapillary/mapillary_tools

Now the upload process fails for all images. See log below.

Basic information

  • Release version: 0.8.0 (current git 42e0e20)
  • System: Linux
  • Capture Device: Android (OpenCamera + location tags inserted by josm)

Steps to reproduce behavior

  1. mapillary_tools process_and_upload .

Actual behavior

There are multiple errors.

Additional information

...

2021-12-12 18:07:14,894 - WARNING - Unknown error test writing image ./XXXXX.jpg
Traceback (most recent call last):
  File "/home/user/.local/lib/python3.9/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 "/home/user/.local/lib/python3.9/site-packages/piexif/_dump.py", line 335, in _dict_to_bytes
    length_str, value_str, four_bytes_over = _value_to_bytes(raw_value,
  File "/home/user/.local/lib/python3.9/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 "/home/user/.local/lib/python3.9/site-packages/mapillary_tools/process_geotag_properties.py", line 197, in verify_exif_write
    edit.dump_image_bytes()
  File "/home/user/.local/lib/python3.9/site-packages/mapillary_tools/exif_write.py", line 69, in dump_image_bytes
    exif_bytes = piexif.dump(self._ef)
  File "/home/user/.local/lib/python3.9/site-packages/piexif/_dump.py", line 68, in dump
    exif_set = _dict_to_bytes(exif_ifd, "Exif", zeroth_length)
  File "/home/user/.local/lib/python3.9/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'>.
2021-12-12 18:07:14,949 - INFO   - {
    "total_images": 2554,
    "processed_images": 0,
    "failed_images": 2542,
    "duplicated_images": 12
}
Traceback (most recent call last):
  File "/home/user/.local/bin/mapillary_tools", line 8, in <module>
    sys.exit(main())
  File "/home/user/.local/lib/python3.9/site-packages/mapillary_tools/__main__.py", line 124, in main
    args.func(vars(args))
  File "/home/user/.local/lib/python3.9/site-packages/mapillary_tools/commands/process_and_upload.py", line 14, in run
    ProcessCommand().run(args)
  File "/home/user/.local/lib/python3.9/site-packages/mapillary_tools/commands/process.py", line 270, in run
    process_finalize(
  File "/home/user/.local/lib/python3.9/site-packages/mapillary_tools/process_geotag_properties.py", line 303, in process_finalize
    raise RuntimeError(
RuntimeError: Failed to process 2542 images. Check ./mapillary_image_description.json for details. Specify --skip_process_errors to skip these errors


@blaueente
Copy link
Author

I tried downgrading:
python3 -m pip install --upgrade git+https://github.com/mapillary/mapillary_tools@69331f38da627e21177b2324e59167711ac977f3
did not fix it.

python3 -m pip install --upgrade git+https://github.com/mapillary/mapillary_tools@b19af6e1497ed35b23b5b92696cdc69f347185b4
(release 0.7.4) fixed it.

@ptpt
Copy link
Member

ptpt commented Dec 13, 2021

Hey @blaueente could you provide one of such images so we can reproduce the issue?

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

Successfully merging a pull request may close this issue.

2 participants