Agisoft Metashape

Agisoft Metashape => Bug Reports => Topic started by: belinda on June 07, 2021, 10:33:10 PM

Title: python chunk.exportReport fails to run on Metashape 1.6.1 - err_no 4182 + 4177
Post by: belinda on June 07, 2021, 10:33:10 PM
Running Metashape 1.6.1 with Python 3.5 on Ubuntu 16.04. For one of the tifs I'm using Metashape with, it can get through chunk.exportRaster() fine but then errors out on chunk.exportReport with the following error messages:
Code: [Select]
"ExportReport: path = /mnt/kairos/data/output/dcp-anadarko-57-optical/20210607145600-dcp-anadarko-57-optical-report.pdf",
"ERROR: error_no=4182, detail_no=0",
"ERROR: error_no=4182, detail_no=0",
"ERROR: error_no=4182, detail_no=0",
"ERROR: error_no=4182, detail_no=0",
"ERROR: error_no=4177, detail_no=0"
... [more of the same] ...
self.chunk.exportReport(report_path)", "OSError: Can't create file: /mnt/kairos/data/output/dcp-anadarko-57-optical/20210607145600-dcp-anadarko-57-optical-report.pdf"

Is there a way to get more information on what these error numbers indicate? Also have tested the same code flow with other images and it generated report correctly for them.
Title: Re: python chunk.exportReport fails to run on Metashape 1.6.1 - err_no 4182 + 4177
Post by: Alexey Pasumansky on June 09, 2021, 07:36:28 PM
Hello belinda,

I suggest to check the latest release version (or at least 1.6.6 version), as the issue seems to be related to the already fixed bug.
Title: Re: python chunk.exportReport fails to run on Metashape 1.6.1 - err_no 4182 + 4177
Post by: belinda on July 07, 2021, 12:29:43 AM
I upgraded the Metashape python package to 1.7.3 but still see the same error_no with 4177 and 4182 when trying to exportReport.
Title: Re: python chunk.exportReport fails to run on Metashape 1.6.1 - err_no 4182 + 4177
Post by: Alexey Pasumansky on July 07, 2021, 06:57:19 PM
Hello belinda,

Can you please provide the similar output for exportReport command from the 1.7.3 version?
Title: Re: python chunk.exportReport fails to run on Metashape 1.6.1 - err_no 4182 + 4177
Post by: belinda on July 07, 2021, 11:43:19 PM
I did also print out the version of metashape to make sure I was running the correct version.

Code: [Select]
2021-07-06 21:09:58,704 INFO [StitchCLI] Metashape version: 1.7.3
INFO [Stitch] exporting orthomosaic to /mnt/kairos/data/output/hilcorp-61-optical/hilcorp-61-optical.tif
ExportRaster: path = /mnt/kairos/data/output/hilcorp-61-optical/hilcorp-61-optical.tif, image_format = TIFF, projection = WGS 84\ngenerating 41139 x 4357 raster in 1 x 1 tiles
2021-07-06 21:20:26,270 INFO [Stitch] optimizing tiff...\n2021-07-06 21:21:09,367
INFO [Stitch] exporting report to /mnt/kairos/data/output/hilcorp-61-optical\nExportReport: path = /mnt/kairos/data/output/hilcorp-61-optical/20210706210954-hilcorp-61-optical-report.pdf
ERROR: error_no=4182, detail_no=0
ERROR: error_no=4182, detail_no=0
ERROR: error_no=4182, detail_no=0
ERROR: error_no=4182, detail_no=0
ERROR: error_no=4177, detail_no=0
ERROR: error_no=4177, detail_no=0
... [more of error_no 4177] ...
ERROR: error_no=4177, detail_no=0
ERROR: error_no=4133, detail_no=0
ERROR: error_no=4133, detail_no=0
Title: Re: python chunk.exportReport fails to run on Metashape 1.6.1 - err_no 4182 + 4177
Post by: Alexey Pasumansky on July 08, 2021, 02:29:48 PM
Hello belinda,

Thank you for sharing the output.

As the issue could be related to the project specifics, would it be possible to send any project that can be used to reproduce the report generation problem on our side to support@agisoft.com?
Title: Re: python chunk.exportReport fails to run on Metashape 1.6.1 - err_no 4182 + 4177
Post by: nik on April 22, 2022, 08:18:49 PM
Dear all,

I am experiencing the same error here. I am running Agisoft Metashape Professional 1.7.3 on a Linux 64-bit system. I was wondering if there is any solution yet?

Kind Regards,

nik

Title: Re: python chunk.exportReport fails to run on Metashape 1.6.1 - err_no 4182 + 4177
Post by: Alexey Pasumansky on April 23, 2022, 01:48:07 PM
Hello nik,

Do you observe the same problem in Metashape 1.8.3?
Title: Re: python chunk.exportReport fails to run on Metashape 1.6.1 - err_no 4182 + 4177
Post by: nik on April 25, 2022, 11:11:56 AM
Dear Alexey,

thank you for your reply. I now updated to Metashape 1.8.3 and the error changed to:

Code: [Select]
PDF error: error_no=4133, detail_no=0
PDF error: error_no=4177, detail_no=0

Interestingly I only get this error for some projects running on the same machine.

Kind Regards,

nik
Title: Re: python chunk.exportReport fails to run on Metashape 1.6.1 - err_no 4182 + 4177
Post by: Alexey Pasumansky on April 25, 2022, 01:25:07 PM
Hello nik,

If the issue doesn't appear on any project, can you please share a project which rises the issue on your side, so that we could reproduce it and analyze?
Title: Re: python chunk.exportReport fails to run on Metashape 1.6.1 - err_no 4182 + 4177
Post by: Fabio Cassinelli on May 17, 2022, 12:39:16 PM
Hi
Attached a dataset of thermal images that generates this error if you call exportReport() function with Python API.
The camera used to acquire these images is DJI ZH20T.
I have Metashape 1.8.3.

https://drive.google.com/file/d/1-rkLF2xN5VFa-hGzGbHh7-HddmhYGQ7T/view?usp=sharing

Best regards,
Fabio Cassinelli
Title: Re: python chunk.exportReport fails to run on Metashape 1.6.1 - err_no 4182 + 4177
Post by: Alexey Pasumansky on May 17, 2022, 02:56:18 PM
Hell Fabio,

Which products should be generated from the provided dataset? I have aligned cameras, generated the dense point cloud, DEM and orthomosaic, but the report generation called from the Console pane worked.

Maybe you can send the project file from which the report cannot be generated? Also please specify the OS version used.
Title: Re: python chunk.exportReport fails to run on Metashape 1.6.1 - err_no 4182 + 4177
Post by: Fabio Cassinelli on May 17, 2022, 04:15:15 PM
My workflow is:
alignCameras
optimizeCameras
buildDepthMaps
buildDenseCloud
buildDem
buildOrthomosaic

My OS version is Windows 10. The error occurs if I export the report with Python API.

Here is my project:

https://drive.google.com/file/d/1kqAFIQr3OWJ9f8govZczE6yWvOwdBsly/view?usp=sharing

Fabio Cassinelli

Title: Re: python chunk.exportReport fails to run on Metashape 1.6.1 - err_no 4182 + 4177
Post by: Alexey Pasumansky on May 17, 2022, 07:17:26 PM
Hello Fabio,

Thank you! That was very helpful, we were able to reproduce the issue and are trying to fix the problem now.
Title: Re: python chunk.exportReport fails to run on Metashape 1.6.1 - err_no 4182 + 4177
Post by: Fabio Cassinelli on August 31, 2022, 06:24:13 PM
Is there any update on this issue?

Fabio
Title: Re: python chunk.exportReport fails to run on Metashape 1.6.1 - err_no 4182 + 4177
Post by: Alexey Pasumansky on August 31, 2022, 06:33:35 PM
Hello Fabio,

I think that this problem is already fixed in 1.8.4 release version. Can you please check that on your side for the projects, where older versions have failed to export the report?