<?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 Error 999999 in duplicate append script. in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/python-error-999999-in-duplicate-append-script/m-p/1303558#M68042</link>
    <description>&lt;P&gt;ok i have updated the updatecursor function to and ran the&amp;nbsp; script. the next error is...&lt;/P&gt;&lt;LI-CODE lang="python"&gt;AttributeError                            Traceback (most recent call last)
In  [13]:
Line 10:    row_val_0 = row.getValue(feilds[0])

AttributeError: 'list' object has no attribute 'getValue'&lt;/LI-CODE&gt;&lt;PRE&gt;&amp;nbsp;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 27 Jun 2023 19:39:07 GMT</pubDate>
    <dc:creator>Laura_m_Conner</dc:creator>
    <dc:date>2023-06-27T19:39:07Z</dc:date>
    <item>
      <title>python Error 999999 in duplicate append script.</title>
      <link>https://community.esri.com/t5/python-questions/python-error-999999-in-duplicate-append-script/m-p/1303474#M68032</link>
      <description>&lt;P&gt;All,&lt;BR /&gt;Recently we have finished innovatory of curbed streets. The curbed streets were appended into a new feature class in batches as an area was finished. Now I am checking to make sure no street segment got appended twice. I have written/modified it the script from&amp;nbsp;&lt;A href="https://support.esri.com/en-us/knowledge-base/how-to-delete-the-older-records-of-duplicate-features-a-000028108" target="_self"&gt;&lt;EM&gt;Delete the older records of duplicate features after using the Append tool in ArcGIS Pro&lt;/EM&gt;&lt;/A&gt;, for our data.&lt;/P&gt;&lt;P&gt;I am encountering Error 999999. None of the advice from&amp;nbsp;&lt;A href="https://pro.arcgis.com/en/pro-app/latest/tool-reference/tool-errors-and-warnings/999001-999999/tool-errors-and-warnings-999998-999999-999999.htm" target="_self"&gt;&lt;EM&gt;999999: Something unexpected caused the tool to fail&lt;/EM&gt;&amp;nbsp;&lt;/A&gt;seems applicable. There is no output file, only the original input file is being modified. There is no geometry network. The used fields do not have any null values. Given where it fails in the script, size should not be an issue. Also, there are only about 9,600 records in the table currently. For testing the script, I am running this on a copy of the data set exported from the enterprise geodatabase to the project database. once the script works, it will be run on the enterprise geodatabase copy. I am unable to test it in administrator mode, but I don't see a reason why this should be an issue.&lt;BR /&gt;&lt;BR /&gt;How do I get the script working, or at least get past this error? Any insight is appreciated.&lt;BR /&gt;Script:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;import arcpy

fc = "StormCurbedStr_ExportFeature"
feilds = ["FULLNAME","curb","Shape"]

cursor = arcpy.UpdateCursor(fc, feilds)

keepList = list()
for row in cursor:
    row_val_0 = row.getValue(feilds[0])
    row_val_1 = row.getValue(feilds[1])
    row_val_2 = row.getValue(feilds[2])
    row_val = row_val_0 + row_val_1 + str(row_val_2)
    
    if row_val not in keepList:
        keepList.append(row_val)

    elif row_val in keepList:
        cursor.deleteRow(row)
    
    else:
        pass
print("done")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;error:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;RuntimeError                              Traceback (most recent call last)
In  [5]:
Line 7:     cursor = arcpy.UpdateCursor(fc, feilds)

File C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\__init__.py, in UpdateCursor:
Line 1234:  return gp.updateCursor(dataset, where_clause, spatial_reference, fields, sort_fields)

File C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\geoprocessing\_base.py, in updateCursor:
Line 374:   self._gp.UpdateCursor(*gp_fixargs(args, True)))

RuntimeError: ERROR 999999: Something unexpected caused the tool to fail. Contact Esri Technical Support (http://esriurl.com/support) to Report a Bug, and refer to the error help for potential solutions or workarounds&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;notes:&lt;/P&gt;&lt;P&gt;Arcpro 3.1.0&lt;/P&gt;&lt;P&gt;OS: Mircrosoft windows 10 pro for workstations&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank You.&lt;/P&gt;&lt;P&gt;Laura&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 27 Jun 2023 17:15:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-error-999999-in-duplicate-append-script/m-p/1303474#M68032</guid>
      <dc:creator>Laura_m_Conner</dc:creator>
      <dc:date>2023-06-27T17:15:22Z</dc:date>
    </item>
    <item>
      <title>Re: python Error 999999 in duplicate append script.</title>
      <link>https://community.esri.com/t5/python-questions/python-error-999999-in-duplicate-append-script/m-p/1303478#M68033</link>
      <description>&lt;P&gt;Typically cursors are done with a "with"&lt;/P&gt;&lt;P&gt;Not sure if this would actually change anything, but maybe give it a shot?&lt;/P&gt;&lt;LI-CODE lang="python"&gt;import arcpy

fc = "StormCurbedStr_ExportFeature"
feilds = ["FULLNAME","curb","Shape"]

keepList = list()
with arcpy.UpdateCursor(fc, feilds) as cursor:
    for row in cursor:
        row_val_0 = row.getValue(feilds[0])
        row_val_1 = row.getValue(feilds[1])
        row_val_2 = row.getValue(feilds[2])
        row_val = row_val_0 + row_val_1 + str(row_val_2)
        
        if row_val not in keepList:
            keepList.append(row_val)

        elif row_val in keepList:
            cursor.deleteRow(row)
        
        else:
            pass
    print("done")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 27 Jun 2023 17:19:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-error-999999-in-duplicate-append-script/m-p/1303478#M68033</guid>
      <dc:creator>AlfredBaldenweck</dc:creator>
      <dc:date>2023-06-27T17:19:49Z</dc:date>
    </item>
    <item>
      <title>Re: python Error 999999 in duplicate append script.</title>
      <link>https://community.esri.com/t5/python-questions/python-error-999999-in-duplicate-append-script/m-p/1303515#M68035</link>
      <description>&lt;P&gt;thanks for the reply&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have tried it and got the same error.&lt;/P&gt;</description>
      <pubDate>Tue, 27 Jun 2023 18:25:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-error-999999-in-duplicate-append-script/m-p/1303515#M68035</guid>
      <dc:creator>Laura_m_Conner</dc:creator>
      <dc:date>2023-06-27T18:25:15Z</dc:date>
    </item>
    <item>
      <title>Re: python Error 999999 in duplicate append script.</title>
      <link>https://community.esri.com/t5/python-questions/python-error-999999-in-duplicate-append-script/m-p/1303516#M68036</link>
      <description>&lt;P&gt;Well, it was worth a shot.&lt;/P&gt;&lt;P&gt;The other thing that isn't clear from your code sample is if you're actually inputting the feature class or just its name.&lt;/P&gt;&lt;P&gt;Like, is your fc variable&amp;nbsp; r"Documents\Projects\Example.gdb\StormCurbedStr_ExportFeature", or is it&amp;nbsp; r"StormCurbedStr_ExportFeature" and you just censored it to share?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 27 Jun 2023 18:30:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-error-999999-in-duplicate-append-script/m-p/1303516#M68036</guid>
      <dc:creator>AlfredBaldenweck</dc:creator>
      <dc:date>2023-06-27T18:30:48Z</dc:date>
    </item>
    <item>
      <title>Re: python Error 999999 in duplicate append script.</title>
      <link>https://community.esri.com/t5/python-questions/python-error-999999-in-duplicate-append-script/m-p/1303519#M68037</link>
      <description>&lt;P&gt;to clarify I am running the script inside the arc pro in a notebook. what i put in the post is verbatim what I have.&lt;/P&gt;</description>
      <pubDate>Tue, 27 Jun 2023 18:37:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-error-999999-in-duplicate-append-script/m-p/1303519#M68037</guid>
      <dc:creator>Laura_m_Conner</dc:creator>
      <dc:date>2023-06-27T18:37:34Z</dc:date>
    </item>
    <item>
      <title>Re: python Error 999999 in duplicate append script.</title>
      <link>https://community.esri.com/t5/python-questions/python-error-999999-in-duplicate-append-script/m-p/1303523#M68038</link>
      <description>&lt;P&gt;Okay yeah, you need to actually give it the full name of whatever feature class you have.&lt;/P&gt;&lt;P&gt;Currently you're giving it just the name of the feature class without the full path, which is like telling someone to find "John". John who?&lt;/P&gt;</description>
      <pubDate>Tue, 27 Jun 2023 18:40:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-error-999999-in-duplicate-append-script/m-p/1303523#M68038</guid>
      <dc:creator>AlfredBaldenweck</dc:creator>
      <dc:date>2023-06-27T18:40:07Z</dc:date>
    </item>
    <item>
      <title>Re: python Error 999999 in duplicate append script.</title>
      <link>https://community.esri.com/t5/python-questions/python-error-999999-in-duplicate-append-script/m-p/1303536#M68040</link>
      <description>&lt;P&gt;well it fisxed &lt;EM&gt;&lt;STRONG&gt;that&lt;/STRONG&gt;&lt;/EM&gt; error but gave me another one. right now the&amp;nbsp; script is&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;import arcpy

fc = r"N:\laura\edit_map4\edit_map4.gdb\StormCurbedStr_ExportFeature"
feilds = ["FULLNAME","curb","Shape"]
keepList = list()

with arcpy.UpdateCursor(fc, feilds) as cursor:

    for row in cursor:
        row_val_0 = row.getValue(feilds[0])
        row_val_1 = row.getValue(feilds[1])
        row_val_2 = row.getValue(feilds[2])
        row_val = row_val_0 + row_val_1 + str(row_val_2)
    
        if row_val not in keepList:
            keepList.append(row_val)

        elif row_val in keepList:
            cursor.deleteRow(row)
    
        else:
            pass
print("done")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp; the current error:&lt;/P&gt;&lt;LI-CODE lang="python"&gt;AttributeError                            Traceback (most recent call last)
In  [10]:
Line 7:     with arcpy.UpdateCursor(fc, feilds) as cursor:

AttributeError: __enter__&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 27 Jun 2023 18:59:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-error-999999-in-duplicate-append-script/m-p/1303536#M68040</guid>
      <dc:creator>Laura_m_Conner</dc:creator>
      <dc:date>2023-06-27T18:59:14Z</dc:date>
    </item>
    <item>
      <title>Re: python Error 999999 in duplicate append script.</title>
      <link>https://community.esri.com/t5/python-questions/python-error-999999-in-duplicate-append-script/m-p/1303543#M68041</link>
      <description>&lt;P&gt;Not sure if this will fix this error, but:&lt;/P&gt;&lt;P&gt;You are using the old&amp;nbsp;&lt;A href="https://pro.arcgis.com/en/pro-app/latest/arcpy/functions/updatecursor.htm" target="_blank" rel="noopener"&gt;UpdateCursor&lt;/A&gt;, whose parameters must be put in the following order:&lt;/P&gt;&lt;PRE&gt;&lt;STRONG&gt;UpdateCursor (dataset, {where_clause}, {spatial_reference}, {fields}, {sort_fields})&lt;/STRONG&gt;&lt;/PRE&gt;&lt;P&gt;Try &lt;EM&gt;arcpy.UpdateCursor(fc, fields= feilds)&lt;/EM&gt; to call the fields parameter out of order.&lt;/P&gt;&lt;P&gt;Alternatively, if you want to keep it as you've already written, change to the&amp;nbsp;&lt;A href="https://pro.arcgis.com/en/pro-app/latest/arcpy/data-access/updatecursor-class.htm" target="_blank" rel="noopener"&gt;new arcpy.da.UpdateCursor()&lt;/A&gt;&amp;nbsp;, which uses the parameter order you're currently using&lt;/P&gt;&lt;PRE&gt;&lt;STRONG&gt;arcpy.da.UpdateCursor (in_table, field_names, {where_clause}, {spatial_reference}, {explode_to_points}, {sql_clause}, {datum_transformation}, {explicit})&lt;/STRONG&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 27 Jun 2023 19:12:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-error-999999-in-duplicate-append-script/m-p/1303543#M68041</guid>
      <dc:creator>AlfredBaldenweck</dc:creator>
      <dc:date>2023-06-27T19:12:12Z</dc:date>
    </item>
    <item>
      <title>Re: python Error 999999 in duplicate append script.</title>
      <link>https://community.esri.com/t5/python-questions/python-error-999999-in-duplicate-append-script/m-p/1303558#M68042</link>
      <description>&lt;P&gt;ok i have updated the updatecursor function to and ran the&amp;nbsp; script. the next error is...&lt;/P&gt;&lt;LI-CODE lang="python"&gt;AttributeError                            Traceback (most recent call last)
In  [13]:
Line 10:    row_val_0 = row.getValue(feilds[0])

AttributeError: 'list' object has no attribute 'getValue'&lt;/LI-CODE&gt;&lt;PRE&gt;&amp;nbsp;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 27 Jun 2023 19:39:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-error-999999-in-duplicate-append-script/m-p/1303558#M68042</guid>
      <dc:creator>Laura_m_Conner</dc:creator>
      <dc:date>2023-06-27T19:39:07Z</dc:date>
    </item>
    <item>
      <title>Re: python Error 999999 in duplicate append script.</title>
      <link>https://community.esri.com/t5/python-questions/python-error-999999-in-duplicate-append-script/m-p/1303569#M68043</link>
      <description>&lt;P&gt;If you switched to arcpy.da.UpdateCursor(), it changed the object that it's delivering to you from a row type to a tuple. Each row is (Fullname, curb, Shape)&lt;/P&gt;&lt;P&gt;Just call: &lt;STRONG&gt;row_value_0 = row[0]&amp;nbsp;&lt;/STRONG&gt;, etc.&lt;/P&gt;&lt;P&gt;Actually, you could probably shorten it to:&lt;/P&gt;&lt;LI-CODE lang="python"&gt;import arcpy

fc = r"N:\laura\edit_map4\edit_map4.gdb\StormCurbedStr_ExportFeature"
feilds = ["FULLNAME","curb","Shape"]
keepList = list()

with arcpy.UpdateCursor(fc, feilds) as cursor:
    for row in cursor:
        row_val = row[0] + row[1] + str(row[2])
    
        if row_val not in keepList:
            keepList.append(row_val)

        elif row_val in keepList:
            cursor.deleteRow(row)
    
        else:
            pass
print("done")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Alternatively, you could try appending the entire row to keep list, rather than doing any sort of processing on it.&lt;/P&gt;&lt;LI-CODE lang="python"&gt;import arcpy

fc = r"N:\laura\edit_map4\edit_map4.gdb\StormCurbedStr_ExportFeature"
feilds = ["FULLNAME","curb","Shape"]
keepList = list()

with arcpy.UpdateCursor(fc, feilds) as cursor:
    for row in cursor:    
        if row not in keepList:
            keepList.append(row)

        elif row in keepList:
            cursor.deleteRow(row)
    
        else:
            pass
print("done")&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 27 Jun 2023 19:47:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-error-999999-in-duplicate-append-script/m-p/1303569#M68043</guid>
      <dc:creator>AlfredBaldenweck</dc:creator>
      <dc:date>2023-06-27T19:47:39Z</dc:date>
    </item>
    <item>
      <title>Re: python Error 999999 in duplicate append script.</title>
      <link>https://community.esri.com/t5/python-questions/python-error-999999-in-duplicate-append-script/m-p/1303675#M68047</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/458875"&gt;@AlfredBaldenweck&lt;/a&gt;&amp;nbsp;this looks like in your first example above you meant to change to da.UpdateCursor since you are using the row[i] method instead of the getValue.&lt;/P&gt;&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/432404"&gt;@Laura_m_Conner&lt;/a&gt;&amp;nbsp;, this would be a good time to use the arcpy.da.UpdateCursor as it is has more power, much, much faster, and, at least for me, is easier to keep straight which field values are what.&lt;/P&gt;&lt;P&gt;Also, I don't see anywhere in the old &lt;A href="https://pro.arcgis.com/en/pro-app/latest/arcpy/functions/updatecursor.htm" target="_self"&gt;arcpy.UpdateCursor&lt;/A&gt; documentation about how to grab the ("Shape" field).&lt;/P&gt;&lt;P&gt;With the&lt;A href="https://pro.arcgis.com/en/pro-app/latest/arcpy/data-access/updatecursor-class.htm" target="_self"&gt; arcpy.da.UpdateCursor&lt;/A&gt;, the field would be "&lt;A href="mailto:SHAPE@&amp;quot;" target="_blank" rel="noopener"&gt;SHAPE@"&lt;/A&gt;&amp;nbsp;to grab the geometry object.&amp;nbsp; Suspect this might be part of the issue.&lt;/P&gt;&lt;P&gt;R_&lt;/P&gt;</description>
      <pubDate>Tue, 27 Jun 2023 23:28:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-error-999999-in-duplicate-append-script/m-p/1303675#M68047</guid>
      <dc:creator>RhettZufelt</dc:creator>
      <dc:date>2023-06-27T23:28:24Z</dc:date>
    </item>
    <item>
      <title>Re: python Error 999999 in duplicate append script.</title>
      <link>https://community.esri.com/t5/python-questions/python-error-999999-in-duplicate-append-script/m-p/1304064#M68057</link>
      <description>&lt;P&gt;thank you. the script works and dose the job i need it to...for some reason it not checking all the duplicates. there is a handful left. now i need to work on&amp;nbsp; figuring that out.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;do you know of any good resources I can use in the future?&lt;/P&gt;</description>
      <pubDate>Wed, 28 Jun 2023 17:51:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-error-999999-in-duplicate-append-script/m-p/1304064#M68057</guid>
      <dc:creator>Laura_m_Conner</dc:creator>
      <dc:date>2023-06-28T17:51:25Z</dc:date>
    </item>
    <item>
      <title>Re: python Error 999999 in duplicate append script.</title>
      <link>https://community.esri.com/t5/python-questions/python-error-999999-in-duplicate-append-script/m-p/1304082#M68058</link>
      <description>&lt;P&gt;I would start with the &lt;A href="https://pro.arcgis.com/en/pro-app/latest/tool-reference/data-management/find-identical.htm" target="_self"&gt;Find Identical&lt;/A&gt; GP tool and/or the &lt;A href="https://pro.arcgis.com/en/pro-app/latest/tool-reference/data-management/delete-identical.htm" target="_self"&gt;Delete Identical&lt;/A&gt; GP tool.&lt;/P&gt;&lt;P&gt;R_&lt;/P&gt;</description>
      <pubDate>Wed, 28 Jun 2023 18:01:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-error-999999-in-duplicate-append-script/m-p/1304082#M68058</guid>
      <dc:creator>RhettZufelt</dc:creator>
      <dc:date>2023-06-28T18:01:05Z</dc:date>
    </item>
  </channel>
</rss>

