<?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: 'Cannot find field' error with arcpy.da.SearchCursor in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/cannot-find-field-error-with-arcpy-da-searchcursor/m-p/1159082#M53404</link>
    <description>&lt;P&gt;Thanks, I didn't have luck with either of those approaches. 'templayer3' is in memory, but I tried converting to a feature class in a gdb and I'm getting the same result.&lt;/P&gt;</description>
    <pubDate>Tue, 29 Mar 2022 20:08:40 GMT</pubDate>
    <dc:creator>DavidHeacock</dc:creator>
    <dc:date>2022-03-29T20:08:40Z</dc:date>
    <item>
      <title>'Cannot find field' error with arcpy.da.SearchCursor</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/cannot-find-field-error-with-arcpy-da-searchcursor/m-p/1158960#M53389</link>
      <description>&lt;P&gt;Hi there - I have some scripts I've been trying to use that I haven't run in several months. There have been updates to Pro/Arcpy since then and now they are throwing errors, so I'm trying to get to the bottom of all&amp;nbsp; them.&lt;/P&gt;&lt;P&gt;I'm getting the "Cannot find field 'PARCEL_ID'" error coming from the code:&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;with arcpy.da.SearchCursor(templayer3, ['PARCEL_ID', "Acres"]) as cursor:
                for row in cursor:&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've checked for any typos, exported versions of 'templayer3' throughout the script and 'PARCEL_ID' is in there correctly formatted, without aliases, etc. Are there alternative reasons why one might get the 'Cannot find field' error?&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Tue, 29 Mar 2022 17:08:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/cannot-find-field-error-with-arcpy-da-searchcursor/m-p/1158960#M53389</guid>
      <dc:creator>DavidHeacock</dc:creator>
      <dc:date>2022-03-29T17:08:42Z</dc:date>
    </item>
    <item>
      <title>Re: 'Cannot find field' error with arcpy.da.SearchCursor</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/cannot-find-field-error-with-arcpy-da-searchcursor/m-p/1158969#M53390</link>
      <description>&lt;P&gt;What if you replace single quotes with double quotes?&lt;/P&gt;&lt;P&gt;"PARCEL_ID"&lt;/P&gt;&lt;P&gt;Also you might want to copy-paste the fieldname rather than typing it down.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Mar 2022 17:35:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/cannot-find-field-error-with-arcpy-da-searchcursor/m-p/1158969#M53390</guid>
      <dc:creator>JayantaPoddar</dc:creator>
      <dc:date>2022-03-29T17:35:53Z</dc:date>
    </item>
    <item>
      <title>Re: 'Cannot find field' error with arcpy.da.SearchCursor</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/cannot-find-field-error-with-arcpy-da-searchcursor/m-p/1158970#M53391</link>
      <description>&lt;P&gt;print the results of ListFields just before the with statement&lt;/P&gt;&lt;P&gt;&lt;A href="https://pro.arcgis.com/en/pro-app/latest/arcpy/functions/listfields.htm" target="_blank"&gt;ListFields—ArcGIS Pro | Documentation&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Mar 2022 17:36:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/cannot-find-field-error-with-arcpy-da-searchcursor/m-p/1158970#M53391</guid>
      <dc:creator>DanPatterson</dc:creator>
      <dc:date>2022-03-29T17:36:19Z</dc:date>
    </item>
    <item>
      <title>Re: 'Cannot find field' error with arcpy.da.SearchCursor</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/cannot-find-field-error-with-arcpy-da-searchcursor/m-p/1158986#M53393</link>
      <description>&lt;P&gt;Double quotes don't work either (that's how they were before actually, the single quotes were just an attempt at trying to resolve the bug)&lt;/P&gt;</description>
      <pubDate>Tue, 29 Mar 2022 17:55:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/cannot-find-field-error-with-arcpy-da-searchcursor/m-p/1158986#M53393</guid>
      <dc:creator>DavidHeacock</dc:creator>
      <dc:date>2022-03-29T17:55:20Z</dc:date>
    </item>
    <item>
      <title>Re: 'Cannot find field' error with arcpy.da.SearchCursor</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/cannot-find-field-error-with-arcpy-da-searchcursor/m-p/1158990#M53394</link>
      <description>&lt;P&gt;The feature class outputs the correct fields. Placed before the problematic cursor:&lt;/P&gt;&lt;LI-CODE lang="python"&gt;field_names_output = [f.name for f in arcpy.ListFields(templayer3)]
            arcpy.AddMessage(field_names_output)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Outputs:&lt;/P&gt;&lt;LI-CODE lang="python"&gt;['OID', 'Shape', 'PARCEL_ID', 'Acres']&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Mar 2022 17:58:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/cannot-find-field-error-with-arcpy-da-searchcursor/m-p/1158990#M53394</guid>
      <dc:creator>DavidHeacock</dc:creator>
      <dc:date>2022-03-29T17:58:09Z</dc:date>
    </item>
    <item>
      <title>Re: 'Cannot find field' error with arcpy.da.SearchCursor</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/cannot-find-field-error-with-arcpy-da-searchcursor/m-p/1159040#M53396</link>
      <description>&lt;P&gt;There are 2 ways to run the searchcursor.&lt;/P&gt;&lt;LI-CODE lang="python"&gt;with arcpy.da.SearchCursor(templayer3, ["PARCEL_ID", "Acres"]) as cursor:
    for row in cursor:
        blah
# --- or -----
cursor = arcpy.da.SearchCursor(templayer3, ["PARCEL_ID", "Acres"]):
for row in cursor:
    blah&lt;/LI-CODE&gt;&lt;P&gt;&lt;A href="https://community.esri.com/t5/arcgis-pro-questions/cannot-find-field-error-with-arcpy-da-searchcursor/m-p/1158960" target="_blank"&gt;'Cannot find field' error with arcpy.da.SearchCurs... - Esri Community&lt;/A&gt;&lt;/P&gt;&lt;P&gt;If the approach yields the same issue AND it is a table in a file geodatabase and not some other variant of a table, then I would escalate to tech support, since you seem to have confirmed that the table and the field exist.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Mar 2022 19:04:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/cannot-find-field-error-with-arcpy-da-searchcursor/m-p/1159040#M53396</guid>
      <dc:creator>DanPatterson</dc:creator>
      <dc:date>2022-03-29T19:04:46Z</dc:date>
    </item>
    <item>
      <title>Re: 'Cannot find field' error with arcpy.da.SearchCursor</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/cannot-find-field-error-with-arcpy-da-searchcursor/m-p/1159048#M53397</link>
      <description>&lt;P&gt;what is you try something like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;fields = ['PARCEL_ID', 'Acres'] 

with arcpy.da.SearchCursor(templayer3, fields) as cursor: 
     for row in cursor: 
        print(u'{0}, {1}'.format(row[0], row[1]))&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 29 Mar 2022 19:13:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/cannot-find-field-error-with-arcpy-da-searchcursor/m-p/1159048#M53397</guid>
      <dc:creator>DominicRobergeIADOT</dc:creator>
      <dc:date>2022-03-29T19:13:54Z</dc:date>
    </item>
    <item>
      <title>Re: 'Cannot find field' error with arcpy.da.SearchCursor</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/cannot-find-field-error-with-arcpy-da-searchcursor/m-p/1159082#M53404</link>
      <description>&lt;P&gt;Thanks, I didn't have luck with either of those approaches. 'templayer3' is in memory, but I tried converting to a feature class in a gdb and I'm getting the same result.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Mar 2022 20:08:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/cannot-find-field-error-with-arcpy-da-searchcursor/m-p/1159082#M53404</guid>
      <dc:creator>DavidHeacock</dc:creator>
      <dc:date>2022-03-29T20:08:40Z</dc:date>
    </item>
    <item>
      <title>Re: 'Cannot find field' error with arcpy.da.SearchCursor</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/cannot-find-field-error-with-arcpy-da-searchcursor/m-p/1159083#M53405</link>
      <description>&lt;P&gt;getting the same error declaring the fields as a list&lt;/P&gt;</description>
      <pubDate>Tue, 29 Mar 2022 20:09:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/cannot-find-field-error-with-arcpy-da-searchcursor/m-p/1159083#M53405</guid>
      <dc:creator>DavidHeacock</dc:creator>
      <dc:date>2022-03-29T20:09:01Z</dc:date>
    </item>
    <item>
      <title>Re: 'Cannot find field' error with arcpy.da.SearchCursor</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/cannot-find-field-error-with-arcpy-da-searchcursor/m-p/1159108#M53411</link>
      <description>&lt;P&gt;In case you haven't tried,&lt;/P&gt;&lt;P&gt;1. Close all applications.&lt;/P&gt;&lt;P&gt;2. Shut down your machine.&lt;/P&gt;&lt;P&gt;3. Get yourself a cup of coffee.&lt;/P&gt;&lt;P&gt;4. Start your system.&lt;/P&gt;&lt;P&gt;5. Start ArcGIS Pro, and give it another try.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Mar 2022 20:42:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/cannot-find-field-error-with-arcpy-da-searchcursor/m-p/1159108#M53411</guid>
      <dc:creator>JayantaPoddar</dc:creator>
      <dc:date>2022-03-29T20:42:37Z</dc:date>
    </item>
    <item>
      <title>Re: 'Cannot find field' error with arcpy.da.SearchCursor</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/cannot-find-field-error-with-arcpy-da-searchcursor/m-p/1159377#M53430</link>
      <description>&lt;P&gt;Well today the cursor is working with the in_memory layer converted to a feature class. So I'll note that in other places in my script. Not sure if something changed with arcpy in any of the updates since the cursor used to work on an in_memory layer.&amp;nbsp; Thanks all.&lt;/P&gt;</description>
      <pubDate>Wed, 30 Mar 2022 13:49:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/cannot-find-field-error-with-arcpy-da-searchcursor/m-p/1159377#M53430</guid>
      <dc:creator>DavidHeacock</dc:creator>
      <dc:date>2022-03-30T13:49:13Z</dc:date>
    </item>
    <item>
      <title>Re: 'Cannot find field' error with arcpy.da.SearchCursor</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/cannot-find-field-error-with-arcpy-da-searchcursor/m-p/1255113#M65128</link>
      <description>&lt;P&gt;Not sure if you ever figured it out, David, but I wanted to put this here in case anybody is having a similar issue...&lt;/P&gt;&lt;P&gt;I was using templates to create my empty feature class and when I tried to use an insert cursor it said the field was missing. I realized I needed to update my table template to accommodate the extra field I was adding. So make sure in your original creation of the feature class/table that you have actually made the field you are trying to insert your values into!&lt;/P&gt;&lt;P&gt;Not sure if this is what it was for you, but I hope you figured it out in the end! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 04 Feb 2023 07:45:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/cannot-find-field-error-with-arcpy-da-searchcursor/m-p/1255113#M65128</guid>
      <dc:creator>JuneS</dc:creator>
      <dc:date>2023-02-04T07:45:13Z</dc:date>
    </item>
    <item>
      <title>Re: 'Cannot find field' error with arcpy.da.SearchCursor</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/cannot-find-field-error-with-arcpy-da-searchcursor/m-p/1417551#M82613</link>
      <description>&lt;P&gt;Thank you &lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/215600"&gt;@DanPatterson&lt;/a&gt;! This saved me a lot of extra frustration. My field aliases were using . instead of underscores.&lt;/P&gt;</description>
      <pubDate>Wed, 01 May 2024 14:24:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/cannot-find-field-error-with-arcpy-da-searchcursor/m-p/1417551#M82613</guid>
      <dc:creator>JeffWard</dc:creator>
      <dc:date>2024-05-01T14:24:46Z</dc:date>
    </item>
  </channel>
</rss>

