<?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: Python Traceback &amp;quot;Attribute Error&amp;quot; when adding toolbox from USGS in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/python-traceback-quot-attribute-error-quot-when/m-p/1407719#M81639</link>
    <description>&lt;P&gt;Thanks for the explanation, super helpful! I'll try correcting the typo and updating my Project Option in case this comes along again.&lt;/P&gt;</description>
    <pubDate>Tue, 09 Apr 2024 20:35:26 GMT</pubDate>
    <dc:creator>marieadeline</dc:creator>
    <dc:date>2024-04-09T20:35:26Z</dc:date>
    <item>
      <title>Python Traceback "Attribute Error" when adding toolbox from USGS</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/python-traceback-quot-attribute-error-quot-when/m-p/1407635#M81628</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="marieadeline_0-1712684063816.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/100498i4FCC667F63BE166F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="marieadeline_0-1712684063816.png" alt="marieadeline_0-1712684063816.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I am trying to add a Toolbox downloaded from&amp;nbsp;&lt;A href="https://astrogeology.usgs.gov/facilities/mrctr/gis-tools" target="_blank" rel="noopener"&gt;GIS Tools | USGS Astrogeology Science Center&lt;/A&gt;&amp;nbsp;which should be error-free. After downloading the toolbox and unzipping the file, it is showing the error message in the picture. Any help would be appreciated!&lt;/P&gt;&lt;P&gt;Error text:&lt;/P&gt;&lt;P&gt;Traceback (most recent call last):&lt;BR /&gt;File "&amp;lt;string&amp;gt;", line 24, in &amp;lt;module&amp;gt;&lt;BR /&gt;AttributeError: 'GPEnvironment' object has no attribute 'overwriteoutput'&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 09 Apr 2024 17:37:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/python-traceback-quot-attribute-error-quot-when/m-p/1407635#M81628</guid>
      <dc:creator>marieadeline</dc:creator>
      <dc:date>2024-04-09T17:37:08Z</dc:date>
    </item>
    <item>
      <title>Re: Python Traceback "Attribute Error" when adding toolbox from USGS</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/python-traceback-quot-attribute-error-quot-when/m-p/1407648#M81630</link>
      <description>&lt;P&gt;I found a solution, not sure it should require correction and likely needs to be modified on the USGS site toolbox download. The error has cleared in ArcGIS Pro.&lt;/P&gt;&lt;P&gt;In the Script, I removed the line 24 that said "overwriteoutput". Now my only concern is that I don't understand what I just removed and the impact it may have on the processing tools...&lt;/P&gt;</description>
      <pubDate>Tue, 09 Apr 2024 18:04:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/python-traceback-quot-attribute-error-quot-when/m-p/1407648#M81630</guid>
      <dc:creator>marieadeline</dc:creator>
      <dc:date>2024-04-09T18:04:51Z</dc:date>
    </item>
    <item>
      <title>Re: Python Traceback "Attribute Error" when adding toolbox from USGS</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/python-traceback-quot-attribute-error-quot-when/m-p/1407674#M81633</link>
      <description>&lt;P&gt;This looks like a simple typo in the code. It should be 'overwriteOutput'.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Dale_Honeycutt_0-1712687754106.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/100509iE4CF5CBCD56ABE04/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Dale_Honeycutt_0-1712687754106.png" alt="Dale_Honeycutt_0-1712687754106.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;When you use geoprocessing tools that output a datafile to disk, such as a feature class or file, this environment setting controls what happens if the output datafile already exists on disk.&amp;nbsp; Most of the time, you just want the output datafile to be overwritten if it exists.&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you're comfortable with editing Python code, you could change it from 'overwriteoutput' to 'overwriteOutput'.&amp;nbsp; But really, whoever provided you this code should change it.&lt;/P&gt;&lt;P&gt;In looking at the documentation, it appears that before version 2.9, using 'overwriteoutput' would not have thrown the AttributeError exception.&amp;nbsp; I suspect that the programmer created this code on a &amp;lt; 2.9 version of Pro.&lt;/P&gt;&lt;P&gt;&lt;A href="https://pro.arcgis.com/en/pro-app/latest/arcpy/classes/env.htm" target="_blank" rel="noopener"&gt;https://pro.arcgis.com/en/pro-app/latest/arcpy/classes/env.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;You can set whether to overwrite in Pro's Project&amp;gt;Options, like this (it's the first option):&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Dale_Honeycutt_1-1712689813389.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/100510iB08BC7EB4B2CD24A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Dale_Honeycutt_1-1712689813389.png" alt="Dale_Honeycutt_1-1712689813389.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I suspect that since you deleted the offending line in the Python code, whatever you choose in Project&amp;gt;Options will be in effect.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 09 Apr 2024 19:12:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/python-traceback-quot-attribute-error-quot-when/m-p/1407674#M81633</guid>
      <dc:creator>Dale_Honeycutt</dc:creator>
      <dc:date>2024-04-09T19:12:46Z</dc:date>
    </item>
    <item>
      <title>Re: Python Traceback "Attribute Error" when adding toolbox from USGS</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/python-traceback-quot-attribute-error-quot-when/m-p/1407719#M81639</link>
      <description>&lt;P&gt;Thanks for the explanation, super helpful! I'll try correcting the typo and updating my Project Option in case this comes along again.&lt;/P&gt;</description>
      <pubDate>Tue, 09 Apr 2024 20:35:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/python-traceback-quot-attribute-error-quot-when/m-p/1407719#M81639</guid>
      <dc:creator>marieadeline</dc:creator>
      <dc:date>2024-04-09T20:35:26Z</dc:date>
    </item>
  </channel>
</rss>

