Select to view content in your preferred language

layout.exportToPDF() runs indefinitely

1029
1
Jump to solution
07-20-2021 02:35 PM
MatthewMuehlhauser
Occasional Contributor

So, I'm in the process of re-writing our python scripts that are being served as Geoprocessing Services to Python 3 and hosted in ArcGIS Portal.

I'm running into an issue with the ArcGIS Pro 3.8 / 3.8.1 update where the Layout.exportToPDF() method will just continue to run indefinitely until I force the task to stop. The output creates a PDF that is 4KB in size, but it's obviously unable to be opened. This doesn't seem to be the case in the 3.7 version.

On our server which has ArcGIS Server 10.8.1 installed, I ran the script in the command line and it worked fine and exported the PDF properly. It's obviously a little difficult to compare 1 to 1 Server to Pro, but there is a difference in the Python version where Server 10.8.1 is using Python 3.6.10 and ArcGIS Pro 3.8.1 is using Python 3.7.10.

I've worked around this and published the python services regardless, but now when I try to submit a job through the server, I get the error :

  • esriJobMessageTypeInformative: java.lang.Exception: Could not service request.

Unfortunately, this doesn't seem to produce any error reports, however; there is a server log. But based on what I'm reading in the logs, it seems like it's a permissions error:

  • The application-specific permission settings do not grant Local Activation permission for the COM Server application with CLSID

However; I'm not sure where the permission error would be coming from except maybe when it's trying to write the PDF and then send a link to download it?  And then how would I even grant permission?

EDIT:

So the latest update to Pro (3.8.2) fixed the export running forever. However; the Geoprocessing task is still having issues and giving the java error.

0 Kudos
1 Solution

Accepted Solutions
MatthewMuehlhauser
Occasional Contributor

The java.lang.Exception error should be fixed in the 10.9 Enterprise.  There was another error exporting the PDF though that came up, but should also be fixed in 10.9.

These can be fixed by installing the following patches:

https://support.esri.com/en/download/7834

https://support.esri.com/en/download/7868

View solution in original post

0 Kudos
1 Reply
MatthewMuehlhauser
Occasional Contributor

The java.lang.Exception error should be fixed in the 10.9 Enterprise.  There was another error exporting the PDF though that came up, but should also be fixed in 10.9.

These can be fixed by installing the following patches:

https://support.esri.com/en/download/7834

https://support.esri.com/en/download/7868

0 Kudos