<?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: Strange Error While Using arcpy.da.UpdateCursor on SDE in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/strange-error-while-using-arcpy-da-updatecursor-on/m-p/1144708#M63790</link>
    <description>&lt;P&gt;Another idea is to start removing fields from the list&amp;nbsp; until is starts working, or try a SearchCursor on that feature class- perhaps with just the ['objectid'] field to start with ( assuming you have&amp;nbsp; field called that).&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 16 Feb 2022 16:31:17 GMT</pubDate>
    <dc:creator>DonMorrison1</dc:creator>
    <dc:date>2022-02-16T16:31:17Z</dc:date>
    <item>
      <title>Strange Error While Using arcpy.da.UpdateCursor on SDE</title>
      <link>https://community.esri.com/t5/python-questions/strange-error-while-using-arcpy-da-updatecursor-on/m-p/1144594#M63782</link>
      <description>&lt;P&gt;I ran the following code on a gdb target and it worked just fine. Now that I've redirected at an SDE target I am getting an ambiguous error:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;def edit_feature_class(structure_data,workspace):
    fc = "Target Feature"
    fields = ["Target Field"]
    descriptions = structure_data["Target Field"].tolist()
    with arcpy.da.Editor(workspace) as edit:
        with arcpy.da.UpdateCursor(fc, fields) as cursor:
            i=0
            for row in cursor:
                row[0] = descriptions[i]
                cursor.updateRow(row)
                i = i+1&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;The error it throws is:&amp;nbsp;with arcpy.da.UpdateCursor(fc, fields) as cursor TypeError Cannot update table&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help is appreciated,&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;f&lt;/P&gt;</description>
      <pubDate>Wed, 16 Feb 2022 13:55:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/strange-error-while-using-arcpy-da-updatecursor-on/m-p/1144594#M63782</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2022-02-16T13:55:50Z</dc:date>
    </item>
    <item>
      <title>Re: Strange Error While Using arcpy.da.UpdateCursor on SDE</title>
      <link>https://community.esri.com/t5/python-questions/strange-error-while-using-arcpy-da-updatecursor-on/m-p/1144619#M63785</link>
      <description>&lt;P&gt;Is "Target Field" really the field name or is it an alias? I think some databases don't allow spaces in the field names....&lt;/P&gt;&lt;P&gt;If the failure is on the updateRow I would add some print or AddMessage statements to dump out descriptions[i] to see which record it is choking on and the contents of the field at that point.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 16 Feb 2022 14:23:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/strange-error-while-using-arcpy-da-updatecursor-on/m-p/1144619#M63785</guid>
      <dc:creator>DonMorrison1</dc:creator>
      <dc:date>2022-02-16T14:23:11Z</dc:date>
    </item>
    <item>
      <title>Re: Strange Error While Using arcpy.da.UpdateCursor on SDE</title>
      <link>https://community.esri.com/t5/python-questions/strange-error-while-using-arcpy-da-updatecursor-on/m-p/1144623#M63786</link>
      <description>&lt;P&gt;Target Field just a dumby name I'm using for the purposes of the question, the real name is a single word. The failure is on&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;with arcpy.da.UpdateCursor(fc, fields) as cursor:&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 16 Feb 2022 14:35:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/strange-error-while-using-arcpy-da-updatecursor-on/m-p/1144623#M63786</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2022-02-16T14:35:15Z</dc:date>
    </item>
    <item>
      <title>Re: Strange Error While Using arcpy.da.UpdateCursor on SDE</title>
      <link>https://community.esri.com/t5/python-questions/strange-error-while-using-arcpy-da-updatecursor-on/m-p/1144651#M63788</link>
      <description>&lt;P&gt;fc&amp;nbsp; ... is that the full path to the featureclass?&lt;/P&gt;&lt;P&gt;fields ... you have confirmed the field names?&lt;/P&gt;&lt;P&gt;as for the cursor, do you have permissions to create one for the source file?&lt;/P&gt;</description>
      <pubDate>Wed, 16 Feb 2022 15:18:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/strange-error-while-using-arcpy-da-updatecursor-on/m-p/1144651#M63788</guid>
      <dc:creator>DanPatterson</dc:creator>
      <dc:date>2022-02-16T15:18:16Z</dc:date>
    </item>
    <item>
      <title>Re: Strange Error While Using arcpy.da.UpdateCursor on SDE</title>
      <link>https://community.esri.com/t5/python-questions/strange-error-while-using-arcpy-da-updatecursor-on/m-p/1144708#M63790</link>
      <description>&lt;P&gt;Another idea is to start removing fields from the list&amp;nbsp; until is starts working, or try a SearchCursor on that feature class- perhaps with just the ['objectid'] field to start with ( assuming you have&amp;nbsp; field called that).&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 16 Feb 2022 16:31:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/strange-error-while-using-arcpy-da-updatecursor-on/m-p/1144708#M63790</guid>
      <dc:creator>DonMorrison1</dc:creator>
      <dc:date>2022-02-16T16:31:17Z</dc:date>
    </item>
    <item>
      <title>Re: Strange Error While Using arcpy.da.UpdateCursor on SDE</title>
      <link>https://community.esri.com/t5/python-questions/strange-error-while-using-arcpy-da-updatecursor-on/m-p/1235780#M66173</link>
      <description>&lt;P&gt;Hi fellow,&amp;nbsp;&lt;/P&gt;&lt;P&gt;to be hones I do not trust yet in the implementation of arcpy for the use of objects with the function "with",&lt;/P&gt;&lt;P&gt;I would strongly suggest to go in the direction of the old school and use the methods of the editor object:&lt;/P&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;PRE&gt;&lt;STRONG&gt;startOperation ()&lt;/STRONG&gt;&lt;/PRE&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;PRE&gt;&lt;STRONG&gt;stopOperation ()&lt;/STRONG&gt;&lt;/PRE&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;PRE&gt;&lt;STRONG&gt;abortOperation ()&lt;/STRONG&gt;&lt;/PRE&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;PRE&gt;&lt;STRONG&gt;undoOperation ()&lt;/STRONG&gt;&lt;/PRE&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;P class=""&gt;&lt;STRONG&gt;redoOperation ()&lt;BR /&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;STRONG&gt;&lt;A href="https://gis.stackexchange.com/questions/158594/using-arcpy-da-editor-correctly" target="_blank" rel="noopener"&gt;https://gis.stackexchange.com/questions/158594/using-arcpy-da-editor-correctly&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;STRONG&gt;Here (&amp;nbsp;&lt;A href="https://pro.arcgis.com/en/pro-app/latest/arcpy/data-access/editor.htm" target="_blank" rel="noopener"&gt;https://pro.arcgis.com/en/pro-app/latest/arcpy/data-access/editor.htm&lt;/A&gt;&amp;nbsp;)&lt;/STRONG&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;STRONG&gt;check the Editor Example 2&lt;/STRONG&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 29 Nov 2022 07:40:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/strange-error-while-using-arcpy-da-updatecursor-on/m-p/1235780#M66173</guid>
      <dc:creator>Cristian_Galindo</dc:creator>
      <dc:date>2022-11-29T07:40:02Z</dc:date>
    </item>
    <item>
      <title>Re: Strange Error While Using arcpy.da.UpdateCursor on SDE</title>
      <link>https://community.esri.com/t5/python-questions/strange-error-while-using-arcpy-da-updatecursor-on/m-p/1562578#M73251</link>
      <description>&lt;P&gt;Was this resolved?&lt;/P&gt;</description>
      <pubDate>Tue, 26 Nov 2024 11:31:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/strange-error-while-using-arcpy-da-updatecursor-on/m-p/1562578#M73251</guid>
      <dc:creator>PantelisKaniouras</dc:creator>
      <dc:date>2024-11-26T11:31:58Z</dc:date>
    </item>
    <item>
      <title>Re: Strange Error While Using arcpy.da.UpdateCursor on SDE</title>
      <link>https://community.esri.com/t5/python-questions/strange-error-while-using-arcpy-da-updatecursor-on/m-p/1565267#M73284</link>
      <description>&lt;P&gt;Any resolution? I migrated my SDE from MSSQL to PostGres. Update and Insert cursors that worked now fail with TYPEERROR: CANNOT UPDATE THE TABLE. Search cursor works. Connection user has Edit privileges, no schema locks, script uses EDIT session, with&amp;nbsp; or without undo, All fail.PostGres error logs complain pg_dist_node and sde_spatial_references do not exist.&lt;/P&gt;</description>
      <pubDate>Thu, 05 Dec 2024 18:42:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/strange-error-while-using-arcpy-da-updatecursor-on/m-p/1565267#M73284</guid>
      <dc:creator>DaveSivertsenz</dc:creator>
      <dc:date>2024-12-05T18:42:28Z</dc:date>
    </item>
    <item>
      <title>Re: Strange Error While Using arcpy.da.UpdateCursor on SDE</title>
      <link>https://community.esri.com/t5/python-questions/strange-error-while-using-arcpy-da-updatecursor-on/m-p/1567208#M73308</link>
      <description>&lt;P&gt;Please ignore my previous comment. Migration removes versioning settings at the geodatabase, feature dataset, feature class and table level. Scripts with update cursors (multiuser mode) that worked on the previous versioned database will fail, until versioning is rebuilt, or modified for unversioned data.&lt;/P&gt;</description>
      <pubDate>Wed, 11 Dec 2024 12:16:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/strange-error-while-using-arcpy-da-updatecursor-on/m-p/1567208#M73308</guid>
      <dc:creator>DaveSivertsenz</dc:creator>
      <dc:date>2024-12-11T12:16:35Z</dc:date>
    </item>
  </channel>
</rss>

