<?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 Issue with Geoprocessing Modules and Standard Toolboxes in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/issue-with-geoprocessing-modules-and-standard/m-p/1214761#M60093</link>
    <description>&lt;P&gt;The Pro geoprocessing system has this neat feature buried in the docs where you can create standard Python packages that contain script tools, then install those packages to your current environment with the accompanying toolbox infrastructure. More info &lt;A href="https://pro.arcgis.com/en/pro-app/latest/arcpy/geoprocessing_and_python/extending-geoprocessing-through-python-modules.htm" target="_blank" rel="noopener"&gt;here&lt;/A&gt;. The docs use a Python toolbox in their examples but there's mentions of supporting standard toolboxes as well, most notably in the introduction to the page I linked. However, when I build a package with a standard toolbox and then install it, attempting to run the tool in Pro 3.0.1 results in this error:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;Traceback (most recent call last):
  File "&amp;lt;string&amp;gt;", line 1, in &amp;lt;module&amp;gt;
  File "C:\Users\JDangermont\AppData\Local\ESRI\conda\envs\testing\Lib\site-packages\foo\esri\arcpy\SampleToolbox.py", line 20, in SampleTool
    raise e
  File "C:\Users\JDangermont\AppData\Local\ESRI\conda\envs\testing\Lib\site-packages\foo\esri\arcpy\SampleToolbox.py", line 17, in SampleTool
    retval = convertArcObjectToPythonObject(gp.SampleTool_SampleToolbox(*gp_fixargs((), True)))
  File "C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\geoprocessing\_base.py", line 510, in __getattr__
    val = getattr(self._gp, attr)
AttributeError: Object: Tool or environment &amp;lt;SampleTool_SampleToolbox&amp;gt; not found&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This could be some weird misconfiguration or environment problem on my end so I've attached a little package that you can download, build, and add to your testing environment. You can build the package using the &lt;A href="https://pro.arcgis.com/en/pro-app/latest/arcpy/geoprocessing_and_python/distributing-python-modules.htm#ESRI_SECTION1_B28DD6345CA04C5D91AC5B29C4D9DF40" target="_blank" rel="noopener"&gt;standard instructions&lt;/A&gt;, install it with pip, relaunch Pro and then run&amp;nbsp;&lt;EM&gt;arcpy.SamplePythonToolbox.SampleTool()&lt;/EM&gt; and&amp;nbsp;&lt;EM&gt;arcpy.SampleToolbox.SampleTool()&lt;/EM&gt; from the Python window.&lt;/P&gt;&lt;P&gt;If the first tool succeeds but the second tool fails then it's safe to say atbx files aren't actually compatible with this packaging system. If so I hope someone from esri can dig into this as it's most likely just an issue with the autogenerated wrapper code.&lt;/P&gt;</description>
    <pubDate>Wed, 21 Sep 2022 18:52:21 GMT</pubDate>
    <dc:creator>DavidSolari</dc:creator>
    <dc:date>2022-09-21T18:52:21Z</dc:date>
    <item>
      <title>Issue with Geoprocessing Modules and Standard Toolboxes</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/issue-with-geoprocessing-modules-and-standard/m-p/1214761#M60093</link>
      <description>&lt;P&gt;The Pro geoprocessing system has this neat feature buried in the docs where you can create standard Python packages that contain script tools, then install those packages to your current environment with the accompanying toolbox infrastructure. More info &lt;A href="https://pro.arcgis.com/en/pro-app/latest/arcpy/geoprocessing_and_python/extending-geoprocessing-through-python-modules.htm" target="_blank" rel="noopener"&gt;here&lt;/A&gt;. The docs use a Python toolbox in their examples but there's mentions of supporting standard toolboxes as well, most notably in the introduction to the page I linked. However, when I build a package with a standard toolbox and then install it, attempting to run the tool in Pro 3.0.1 results in this error:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;Traceback (most recent call last):
  File "&amp;lt;string&amp;gt;", line 1, in &amp;lt;module&amp;gt;
  File "C:\Users\JDangermont\AppData\Local\ESRI\conda\envs\testing\Lib\site-packages\foo\esri\arcpy\SampleToolbox.py", line 20, in SampleTool
    raise e
  File "C:\Users\JDangermont\AppData\Local\ESRI\conda\envs\testing\Lib\site-packages\foo\esri\arcpy\SampleToolbox.py", line 17, in SampleTool
    retval = convertArcObjectToPythonObject(gp.SampleTool_SampleToolbox(*gp_fixargs((), True)))
  File "C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\geoprocessing\_base.py", line 510, in __getattr__
    val = getattr(self._gp, attr)
AttributeError: Object: Tool or environment &amp;lt;SampleTool_SampleToolbox&amp;gt; not found&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This could be some weird misconfiguration or environment problem on my end so I've attached a little package that you can download, build, and add to your testing environment. You can build the package using the &lt;A href="https://pro.arcgis.com/en/pro-app/latest/arcpy/geoprocessing_and_python/distributing-python-modules.htm#ESRI_SECTION1_B28DD6345CA04C5D91AC5B29C4D9DF40" target="_blank" rel="noopener"&gt;standard instructions&lt;/A&gt;, install it with pip, relaunch Pro and then run&amp;nbsp;&lt;EM&gt;arcpy.SamplePythonToolbox.SampleTool()&lt;/EM&gt; and&amp;nbsp;&lt;EM&gt;arcpy.SampleToolbox.SampleTool()&lt;/EM&gt; from the Python window.&lt;/P&gt;&lt;P&gt;If the first tool succeeds but the second tool fails then it's safe to say atbx files aren't actually compatible with this packaging system. If so I hope someone from esri can dig into this as it's most likely just an issue with the autogenerated wrapper code.&lt;/P&gt;</description>
      <pubDate>Wed, 21 Sep 2022 18:52:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/issue-with-geoprocessing-modules-and-standard/m-p/1214761#M60093</guid>
      <dc:creator>DavidSolari</dc:creator>
      <dc:date>2022-09-21T18:52:21Z</dc:date>
    </item>
  </channel>
</rss>

