I uploaded 900 pictures from drone, and did not notice that on was empty.
After upload, the program stop and exit.
I did check the single picture named in error log, and it was a zero byte, probably an error during recording in the fly.
Deleted the single picture and upload again.
It wolud be a nica to have an instruction to skip unreadible pictures insted of simple abort.
It wold make the program more robust.
Daniele
extract from error log.
[INFO] Loading 924 images
[WARNING] Cannot read /var/www/data/3c6d9526-3963-44b5-9db8-aedaf5f8035a/images/DJI_0199.JPG with PIL, fallback to cv2: cannot identify image file ‘/var/www/data/3c6d9526-3963-44b5-9db8-aedaf5f8035a/images/DJI_0199.JPG’
Traceback (most recent call last):
File “/code/opendm/get_image_size.py”, line 13, in get_image_size
with Image.open(file_path) as img:
File “/usr/local/lib/python3.9/dist-packages/PIL/Image.py”, line 2943, in open
raise UnidentifiedImageError(
PIL.UnidentifiedImageError: cannot identify image file ‘/var/www/data/3c6d9526-3963-44b5-9db8-aedaf5f8035a/images/DJI_0199.JPG’
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File “/code/run.py”, line 53, in
retcode = app.execute()
File “/code/stages/odm_app.py”, line 130, in execute
raise e
File “/code/stages/odm_app.py”, line 94, in execute
self.first_stage.run()
File “/code/opendm/types.py”, line 321, in run
self.process(self.args, outputs)
File “/code/stages/dataset.py”, line 112, in process
p = types.ODM_Photo(f)
File “/code/opendm/photo.py”, line 92, in init
self.parse_exif_values(path_file)
File “/code/opendm/photo.py”, line 274, in parse_exif_values
self.width, self.height = get_image_size.get_image_size(_path_file)
File “/code/opendm/get_image_size.py”, line 19, in get_image_size
width = img.shape[1]
AttributeError: ‘NoneType’ object has no attribute ‘shape’