OpenSfM icon indicating copy to clipboard operation
OpenSfM copied to clipboard

Images not in Images Directory leads to ZeroDivisionError

Open jonasdlindner opened this issue 4 years ago • 0 comments

I accidentally misspelled directory data/berlin/images to data/berlin/image. Instead of getting an error like:

Traceback (most recent call last):
   File "/source/OpenSfM/bin/opensfm_main.py", line 25, in <module>
     commands.command_runner(
   File "/source/OpenSfM/opensfm/commands/command_runner.py", line 37, in command_runner
     command.run(data, args)
   File "/source/OpenSfM/opensfm/commands/command.py", line 12, in run
     self.run_impl(data, args)
   File "/source/OpenSfM/opensfm/commands/detect_features.py", line 11, in run_impl
     detect_features.run_dataset(dataset)
   File "/source/OpenSfM/opensfm/actions/detect_features.py", line 28, in run_dataset
     max_queue_size, int(expected_mb / average_image_size(data))
 ZeroDivisionError: float division by zero

i would appreciate an more descriptive message like:

No Images found in data/berlin/image

jonasdlindner avatar Feb 11 '22 14:02 jonasdlindner