<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Using lyrx in a  published Service in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/using-lyrx-in-a-published-service/m-p/1138912#M63623</link>
    <description>&lt;P&gt;I was hoping this problem might be solved in an newer version auf ArcGIS server, but in 10.8.1 the problem still exists.&lt;/P&gt;</description>
    <pubDate>Mon, 31 Jan 2022 14:55:50 GMT</pubDate>
    <dc:creator>AndreasRuloffs2</dc:creator>
    <dc:date>2022-01-31T14:55:50Z</dc:date>
    <item>
      <title>Using lyrx in a  published Service</title>
      <link>https://community.esri.com/t5/python-questions/using-lyrx-in-a-published-service/m-p/1097142#M62332</link>
      <description>&lt;P&gt;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.&amp;nbsp;&lt;/P&gt;&lt;P&gt;The crash happens, when a lyrx File is used to create a Layer. It crashes with this message in the log file:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;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.&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;an errorreport is not created.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;When I execute the script with an lyr-File it works.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I have attached a simple project, that crashes.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;raster_symbol_layer = arcpy.mp.LayerFile(
    raster_symbol_layer_path).listLayers()[0]
arcpy.SetParameter(0, raster_symbol_layer.longName)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;Thank you,&lt;/P&gt;&lt;P&gt;Andreas&lt;/P&gt;</description>
      <pubDate>Fri, 10 Sep 2021 11:10:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/using-lyrx-in-a-published-service/m-p/1097142#M62332</guid>
      <dc:creator>AndreasRuloffs2</dc:creator>
      <dc:date>2021-09-10T11:10:08Z</dc:date>
    </item>
    <item>
      <title>Re: Using lyrx in a  published Service</title>
      <link>https://community.esri.com/t5/python-questions/using-lyrx-in-a-published-service/m-p/1138912#M63623</link>
      <description>&lt;P&gt;I was hoping this problem might be solved in an newer version auf ArcGIS server, but in 10.8.1 the problem still exists.&lt;/P&gt;</description>
      <pubDate>Mon, 31 Jan 2022 14:55:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/using-lyrx-in-a-published-service/m-p/1138912#M63623</guid>
      <dc:creator>AndreasRuloffs2</dc:creator>
      <dc:date>2022-01-31T14:55:50Z</dc:date>
    </item>
  </channel>
</rss>

