Hello Alexey,
Using the Python API for the 1.2.0 release, I have a significant lower amount of errors in my code.
The main problem now is that when I run my script, PhotoScan is "unable to load photos" (2017-02-20 11:08:12 Error: Can't load photos)
Since my photos' extensions are in upper case, I figured this code would be the problem:
# Add Photos to Project
image_list = os.listdir(path_photos)
for photo in image_list:
if photo.rsplit(".",1)[1].lower() in ["jpg", "jpeg", "tif", "png"]:
chunk.addPhotos(path_photos + photo)
else:
print("""Pas de photo exploitable dans le dossier.""")
PhotoScan.app.update()
So I edited that part to consider the extension in UPPER case.
image_list = os.listdir(path_photos)
for photo in image_list:
if photo.rsplit(".",1)[1].upper() in ["JPG", "JPEG", "TIF", "PNG"]:
chunk.addPhotos(path_photos + photo)
else:
print("""Pas de photo exploitable dans le dossier.""")
PhotoScan.app.update()
No idea what's wrong here, can you help me?
As for the rest, PhotoScan then tries to start a Photo Align process but fails because I have no photo loaded. The chunk duplication part has an issue in the renaming process but that's not an important issue.
I hope you had a great week end!