Hello, I'm trying to export a JPEG with a geoprocessing task running on an Arcgis server. The ExportToJPEG line of code crashes with an error with ArcGIS Server python, but works fine with local ArcGIS Pro python. I can't figure out what's wrong. Here is the error:
Job Messages:
esriJobMessageTypeInformative: Submitted.
esriJobMessageTypeInformative: Executing...
esriJobMessageTypeError: Failed.
esriJobMessageTypeInformative: java.lang.RuntimeException: java.util.concurrent.ExecutionException: java.lang.RuntimeException: com.esri.arcgis.discovery.admin.rediscovery.util.ArcGISServiceException: Impossible de traiter la requête.
Here's a simple code test I did, it crashes at the last line:
import arcpy
aprx = arcpy.mp.ArcGISProject(r"D:\path\myAPRX.aprx")
layout = aprx.listLayouts('layout_name')[0]
mf = layout.listElements('MAPFRAME_ELEMENT', '*')[0]
extent = arcpy.Extent(446998.96875, 214866.71875, 446579.875, 215163.046875)
mf.camera.setExtent(extent)
mf.exportToPDF('path\out.jpg')
Hi,
did you find a solution? what was it? I have same error after upgrading arcgis server ..worked fine before.
Thank you,
Georgeta
Hello,
No, it still doesn't work! I contacted esri support, but the topic is still pending.
What are your previous and current versions of ArcGIS Server ? In which environment are you? single machine or cluster?
Thanks !
I set the log level to 'info' as you indicate, but it doesn't give me much infos in the logs, just very vague information
I will create a ticket at esri as you say
Thank you very much for your help
Was this ever solved? I'm running into a similar issue and would like to know what was discovered.
I am having the same issue, same error with a GP service that exports a map series. Anyone been able to find a solution?
What version of Pro are you using? I think in 2.x you cannot export a map series to .jpg, but in 3.x you can.
I'm experiencing the same issue. I published a geoprocessing service that uses layout.exportToPDF, but it fails at the exportToPDF line. I also tried switching to exportToPNG and exportToJPEG, but the issue persists. Below are the job messages I encountered:
We contacted ESRI Support Services with this issue and they had a fix that worked for us! Our affected servers had updated to VMWare Tools 12.5.0, and that version caused the issue. We upgraded to 12.5.1 and that took care of it, though downgrading is apparently also an option.
Hope everyone has the same luck with it!