Skip to content

Show nicer error when GPS not present for image input #13

@himynamesdave

Description

@himynamesdave

Currently when an image (or images) entered as input have no GPS, the script has a hard failure:

Traceback (most recent call last):
  File "/Users/dgreenwood/Documents/repos/trek-view/telemetry-injector/telemetry-injector.py", line 96, in <module>
    main()
  File "/Users/dgreenwood/Documents/repos/trek-view/telemetry-injector/telemetry-injector.py", line 66, in main
    create_video_from_images(images_directory, output_dir, output_vid, o_vid, framerate, metadata)
  File "/Users/dgreenwood/Documents/repos/trek-view/telemetry-injector/metadata/metadata.py", line 147, in create_video_from_images
    m = g_next['GPSDateTime'].split('.')
KeyError: 'GPSDateTime'

We should show a nicer error to user:

"One or more of your images have no GPS metadata. Please remove these and try again."

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions