<?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 Geoprocessing service fails via widget but works from IDLE (ArcGIS Server Python 2.7) in ArcGIS Enterprise Questions</title>
    <link>https://community.esri.com/t5/arcgis-enterprise-questions/geoprocessing-service-fails-via-widget-but-works/m-p/1154467#M32757</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I have published a custom python script tool via ArcGIS Pro to Portal. After publishing, I've made some changes to the python file on our server (i.e. found in this location: arcgisserver\directories\arcgissystem\arcgisinput\&amp;lt;TOOL NAME&amp;gt;.GPServer\extracted\...\script.py).&lt;/P&gt;&lt;P&gt;If I sign in to the server I can successfully run the script on the server via IDLE (&lt;STRONG&gt;ArcGIS Server Python 2.7&lt;/STRONG&gt;). Running it in this way, it works exactly as I'd like. However, if I edit and run with IDLE (&lt;STRONG&gt;ArcGIS Server&lt;/STRONG&gt;), I get a Traceback error which, amongst other things, includes the following message:&lt;/P&gt;&lt;P&gt;AttributeError: module 'arcpy' has no attribute 'mapping'&lt;/P&gt;&lt;P&gt;I get the same error when I run via a geoprocessing widget in a web mapping application. (Note that the geoprocessing widget is the final location for this tool to work).&lt;/P&gt;&lt;P&gt;I guess this means the geoprocessing widget runs with whichever version of Python and/or arcpy is used by the 'ArcGIS Server' IDLE.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I realize one solution is to re-write the script to fit this other syntax, something like &lt;A href="https://community.esri.com/t5/python-questions/arcpy-mapping-module-has-no-attribute/td-p/1051999" target="_self"&gt;this&lt;/A&gt;, but I'd rather not do that.&lt;/P&gt;&lt;P&gt;Is there any way I can set my run my geoprocessing widget to use the 'ArcGIS Server Python 2.7' setup so that I don't need to change my script?&lt;/P&gt;&lt;P&gt;Our current install on the server is 10.9.1.&lt;/P&gt;</description>
    <pubDate>Wed, 16 Mar 2022 19:00:27 GMT</pubDate>
    <dc:creator>Sysniper</dc:creator>
    <dc:date>2022-03-16T19:00:27Z</dc:date>
    <item>
      <title>Geoprocessing service fails via widget but works from IDLE (ArcGIS Server Python 2.7)</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/geoprocessing-service-fails-via-widget-but-works/m-p/1154467#M32757</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I have published a custom python script tool via ArcGIS Pro to Portal. After publishing, I've made some changes to the python file on our server (i.e. found in this location: arcgisserver\directories\arcgissystem\arcgisinput\&amp;lt;TOOL NAME&amp;gt;.GPServer\extracted\...\script.py).&lt;/P&gt;&lt;P&gt;If I sign in to the server I can successfully run the script on the server via IDLE (&lt;STRONG&gt;ArcGIS Server Python 2.7&lt;/STRONG&gt;). Running it in this way, it works exactly as I'd like. However, if I edit and run with IDLE (&lt;STRONG&gt;ArcGIS Server&lt;/STRONG&gt;), I get a Traceback error which, amongst other things, includes the following message:&lt;/P&gt;&lt;P&gt;AttributeError: module 'arcpy' has no attribute 'mapping'&lt;/P&gt;&lt;P&gt;I get the same error when I run via a geoprocessing widget in a web mapping application. (Note that the geoprocessing widget is the final location for this tool to work).&lt;/P&gt;&lt;P&gt;I guess this means the geoprocessing widget runs with whichever version of Python and/or arcpy is used by the 'ArcGIS Server' IDLE.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I realize one solution is to re-write the script to fit this other syntax, something like &lt;A href="https://community.esri.com/t5/python-questions/arcpy-mapping-module-has-no-attribute/td-p/1051999" target="_self"&gt;this&lt;/A&gt;, but I'd rather not do that.&lt;/P&gt;&lt;P&gt;Is there any way I can set my run my geoprocessing widget to use the 'ArcGIS Server Python 2.7' setup so that I don't need to change my script?&lt;/P&gt;&lt;P&gt;Our current install on the server is 10.9.1.&lt;/P&gt;</description>
      <pubDate>Wed, 16 Mar 2022 19:00:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/geoprocessing-service-fails-via-widget-but-works/m-p/1154467#M32757</guid>
      <dc:creator>Sysniper</dc:creator>
      <dc:date>2022-03-16T19:00:27Z</dc:date>
    </item>
    <item>
      <title>Re: Geoprocessing service fails via widget but works from IDLE (ArcGIS Server Python 2.7)</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/geoprocessing-service-fails-via-widget-but-works/m-p/1154476#M32758</link>
      <description>&lt;P&gt;possibly heading 'Specify a Python environment for a single geoprocessing service'&lt;/P&gt;&lt;P&gt;&lt;A href="https://enterprise.arcgis.com/en/server/latest/publish-services/windows/deploying-custom-python-packages.htm" target="_blank"&gt;Deploying custom Python packages for ArcGIS Server—ArcGIS Server | Documentation for ArcGIS Enterprise&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 16 Mar 2022 19:29:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/geoprocessing-service-fails-via-widget-but-works/m-p/1154476#M32758</guid>
      <dc:creator>DavidPike</dc:creator>
      <dc:date>2022-03-16T19:29:09Z</dc:date>
    </item>
  </channel>
</rss>

