Using lyrx in a published Service

354
1
09-10-2021 04:10 AM
AndreasRuloffs2
New Contributor II

I made an arcpy Script, that works, if it is executed locally in arcGIS pro. I am able to publish it on may arcGIS server, but then the script crashes. 

The crash happens, when a lyrx File is used to create a Layer. It crashes with this message in the log file:

 

 

Instance of the service 'testLyrx.GPServer' crashed. Please see if an error report was generated in 'C:\arcgisserver\logs\AGS1071.GISCON-GI.LOCAL\errorreports'. To send an error report to Esri, compose an e-mail to ArcGISErrorReport@esri.com and attach the error report file.

 

 

an errorreport is not created. 

When I execute the script with an lyr-File it works.

I have attached a simple project, that crashes.

 

 

raster_symbol_layer = arcpy.mp.LayerFile(
    raster_symbol_layer_path).listLayers()[0]
arcpy.SetParameter(0, raster_symbol_layer.longName)

 

 

 Thank you,

Andreas

0 Kudos
1 Reply
AndreasRuloffs2
New Contributor II

I was hoping this problem might be solved in an newer version auf ArcGIS server, but in 10.8.1 the problem still exists.

0 Kudos