Agisoft Metashape
Agisoft Metashape => Python and Java API => Topic started by: Chris_1979 on March 12, 2021, 01:51:02 PM
-
Hi There,
I have been using the attached script with Metashape version 1.5.5 for the past couple of years. I recently updated to 1.7.1 and the script no longer works. I think I fixed one issue with the the way I was loading the XML calibration file, but I think it's now failing on the chunk.addPhotos(image_list).
Do I need to add the extra arguments (filegroup, and image layout)? If so, how should I do that?
Kind Regards,
Chris
-
Hello Chris,
Please try to include an additional argument to addPhotos method:
chunk.addPhotos(image_list, strip_extensions=False)
Does it solve the problem?
-
Hi Alexey,
Unfortunately that didn't fix it either. Also tried setting it to True.
When I run the script through the console, I get the error in the attached image.
Any suggestions?
Kind Regards,
Chris
-
Hello Chris,
You may need to replace the "map" line (#40) with the following line:
image_list = [image.strip() for image in image_list]
Also make sure that the paths use either "slash" symbol or double-"backslash".
-
Hi Alexey,
Thank you for this. It helped a lot.
Kind Regards,
Chris