kartaview / upload-scripts

Uploader tools for KartaView
MIT License
61 stars 30 forks source link

print a message in case no photos are found instead of crashing #31

Closed datendelphin closed 7 years ago

datendelphin commented 7 years ago

Currently, the script crashes: Traceback (most recent call last): File "upload_photos_by_exif.py", line 385, in main with open(path + "sequence_file.txt", "r+") as sequence_file: FileNotFoundError: [Errno 2] No such file or directory: '/path/sequence_file.txt'

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "upload_photos_by_exif.py", line 488, in main(sys.argv[1:]) File "upload_photos_by_exif.py", line 390, in main if latitude is None and longitude is None:

Afterwards, it will print a nice message: No photos found in path "/path/". This program does not search for files in subdirectories of the given path.

bogdan-racasan commented 7 years ago

Good idea. Thanks