<?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: Publishing .PYT as GP Service with multiple .py files in ArcGIS Enterprise Questions</title>
    <link>https://community.esri.com/t5/arcgis-enterprise-questions/publishing-pyt-as-gp-service-with-multiple-py/m-p/1538455#M40574</link>
    <description>&lt;P&gt;If anyone comes across this issue in the future, here's some of things I've discovered through debugging it:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Publishing to ArcGIS Server 11.1 from ArcGIS Pro 3.1 does not have this issue.&lt;/LI&gt;&lt;LI&gt;Publishing to ArcGIS Server 11.1 from ArcGIS Pro 3.3.1 showed this issue&lt;/LI&gt;&lt;LI&gt;Moving all files to the same directory (no sub-directories) caused them to be moved over.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, in order to move all files consistently, you must also use the import format of "Import utils." Something like "From utils import logger" will not work.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 13 Sep 2024 18:39:47 GMT</pubDate>
    <dc:creator>West-d-gis</dc:creator>
    <dc:date>2024-09-13T18:39:47Z</dc:date>
    <item>
      <title>Publishing .PYT as GP Service with multiple .py files</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/publishing-pyt-as-gp-service-with-multiple-py/m-p/1533332#M40474</link>
      <description>&lt;P&gt;I am trying to figure out how to properly publish a geoprocessing tool and get it to work when published. The tool works fine in Pro and can be shared out. However, when it is shared it is only copying the .pyt file to the ArcGIS Server and it is not copying any of the required files. I am following the recommended file structure from ESRI's documentation of:&lt;/P&gt;&lt;P&gt;-project&lt;BR /&gt;--file.pyt&lt;BR /&gt;--file.pyt.xml&lt;BR /&gt;--__init__.py&lt;BR /&gt;--models&lt;BR /&gt;---required.py&lt;BR /&gt;---__init__.py&lt;BR /&gt;--utils&lt;BR /&gt;---utils.py&lt;BR /&gt;---__init__.py&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;However, when sharing as a GP service, nothing in the models or utils directories gets copied over.&lt;BR /&gt;&lt;BR /&gt;What is the suggested best practices for publishing a geoprocessing tool that contains nested python files?&lt;/P&gt;</description>
      <pubDate>Fri, 30 Aug 2024 13:48:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/publishing-pyt-as-gp-service-with-multiple-py/m-p/1533332#M40474</guid>
      <dc:creator>West-d-gis</dc:creator>
      <dc:date>2024-08-30T13:48:55Z</dc:date>
    </item>
    <item>
      <title>Re: Publishing .PYT as GP Service with multiple .py files</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/publishing-pyt-as-gp-service-with-multiple-py/m-p/1538455#M40574</link>
      <description>&lt;P&gt;If anyone comes across this issue in the future, here's some of things I've discovered through debugging it:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Publishing to ArcGIS Server 11.1 from ArcGIS Pro 3.1 does not have this issue.&lt;/LI&gt;&lt;LI&gt;Publishing to ArcGIS Server 11.1 from ArcGIS Pro 3.3.1 showed this issue&lt;/LI&gt;&lt;LI&gt;Moving all files to the same directory (no sub-directories) caused them to be moved over.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, in order to move all files consistently, you must also use the import format of "Import utils." Something like "From utils import logger" will not work.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 13 Sep 2024 18:39:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/publishing-pyt-as-gp-service-with-multiple-py/m-p/1538455#M40574</guid>
      <dc:creator>West-d-gis</dc:creator>
      <dc:date>2024-09-13T18:39:47Z</dc:date>
    </item>
  </channel>
</rss>

