<?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: Using Update Cursor in For Loop - error in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/using-update-cursor-in-for-loop-error/m-p/544939#M42504</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Kalley - Thank you for the clarification. That worked!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 14 Mar 2013 12:23:20 GMT</pubDate>
    <dc:creator>RachelAlbritton1</dc:creator>
    <dc:date>2013-03-14T12:23:20Z</dc:date>
    <item>
      <title>Using Update Cursor in For Loop - error</title>
      <link>https://community.esri.com/t5/python-questions/using-update-cursor-in-for-loop-error/m-p/544933#M42498</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I am trying to use an update cursor ina for loop and I keep getting an IOError that I don't understand.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The script is looping through my table, selecting records one by one, then doing a select by location to fins out how many buffers intersect the selected record. The number of buffers that intersect that record need to be recorded in the attribute table. A sub-set of my code and error statements are below.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;RCWfieldList = ["three_mi","avg_gs","PGB_avg","one_25mi","pot_hab"] ParcelFieldList=arcpy.ListFields(parcelsFC) &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for RCWfield in RCWfieldList: &amp;nbsp;&amp;nbsp;&amp;nbsp; if RCWfield in ParcelFieldList: &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; print "Field", RCWfield, "found in", parcelsFC &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.AddMessage("Field " + RCWfield + " found in " + parcelsFC)&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; else: # else the fieldname is not yet a field in the table, field will be added &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; print"Field", RCWfield, "NOT found in", parcelsFC &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.AddMessage("\nField " + RCWfield + " NOT found in " + parcelsFC) &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.AddField_management(parcelsFC, RCWfield, "DOUBLE") &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; print RCWfield, "created" &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.AddMessage(RCWfield+" created/n")&amp;nbsp; #Select out each parcel record one by one and evalauate how many cluster buffers intersect with that parcel. #Update Parcel Attribute Table field three_mi with the # of buffers that intersect that parcel&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for parcel in range(0,1092): &amp;nbsp;&amp;nbsp;&amp;nbsp; FID = "FID=%s" % (parcel) &amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.SelectLayerByAttribute_management(parcelsFL,"NEW_SELECTION",FID) &amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.SelectLayerByLocation_management(CbuffersFL,"INTERSECT",parcelsFL) &amp;nbsp;&amp;nbsp;&amp;nbsp; bufferCount = int(arcpy.GetCount_management(CbuffersFL).getOutput(0)) &amp;nbsp;&amp;nbsp;&amp;nbsp; uc=arcpy.UpdateCursor(parcel) &amp;nbsp;&amp;nbsp;&amp;nbsp; for line in uc: &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; line.three_mi = bufferCount &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; uc.updateRow(line) #Actually changes the table values to buffer count &amp;nbsp;&amp;nbsp;&amp;nbsp; del line &amp;nbsp;&amp;nbsp;&amp;nbsp; del uc &amp;nbsp;&amp;nbsp;&amp;nbsp; #print "There are", bufferCount, "buffers that intersect with parcel FID #", FID &amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.SelectLayerByAttribute_management(parcelsFL,"CLEAR_SELECTION")&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Error Statement:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;Traceback (most recent call last): &amp;nbsp; File "P:\Environmental Division\The Nature Conservancy\TNC GIS Data\TNC GIS Projects\RCW\Code\ForLoop.py", line 68, in &amp;lt;module&amp;gt; &amp;nbsp;&amp;nbsp;&amp;nbsp; uc=arcpy.UpdateCursor(parcel) &amp;nbsp; File "C:\Program Files\ArcGIS\Desktop10.0\arcpy\arcpy\__init__.py", line 841, in UpdateCursor &amp;nbsp;&amp;nbsp;&amp;nbsp; return gp.updateCursor(*args) &amp;nbsp; File "C:\Program Files\ArcGIS\Desktop10.0\arcpy\arcpy\geoprocessing\_base.py", line 362, in updateCursor &amp;nbsp;&amp;nbsp;&amp;nbsp; self._gp.UpdateCursor(*gp_fixargs(args))) IOError: "0" does not exist&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm not understanding why its saying IOError "0" does not exist. It's doing this on the very first record. The input value for this record should be 3. All fields that need to be populated currently have a value of 0. Field properties = double. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks in advance&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Mar 2013 19:07:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/using-update-cursor-in-for-loop-error/m-p/544933#M42498</guid>
      <dc:creator>RachelAlbritton1</dc:creator>
      <dc:date>2013-03-13T19:07:24Z</dc:date>
    </item>
    <item>
      <title>Re: Using Update Cursor in For Loop - error</title>
      <link>https://community.esri.com/t5/python-questions/using-update-cursor-in-for-loop-error/m-p/544934#M42499</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;What is line 362?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Mar 2013 19:24:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/using-update-cursor-in-for-loop-error/m-p/544934#M42499</guid>
      <dc:creator>MichaelVolz</dc:creator>
      <dc:date>2013-03-13T19:24:03Z</dc:date>
    </item>
    <item>
      <title>Re: Using Update Cursor in For Loop - error</title>
      <link>https://community.esri.com/t5/python-questions/using-update-cursor-in-for-loop-error/m-p/544935#M42500</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Your error is occurring because arcpy.UpdateCursor requires a string input (path to dataset), and your variable 'parcel' is an integer.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Try:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code jive_text_macro"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; uc=arcpy.UpdateCursor(parcelsFL)&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Mar 2013 19:24:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/using-update-cursor-in-for-loop-error/m-p/544935#M42500</guid>
      <dc:creator>KerryAlley</dc:creator>
      <dc:date>2013-03-13T19:24:44Z</dc:date>
    </item>
    <item>
      <title>Re: Using Update Cursor in For Loop - error</title>
      <link>https://community.esri.com/t5/python-questions/using-update-cursor-in-for-loop-error/m-p/544936#M42501</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;mvolz47 - I do not have a line 362 in my code. My code only has 77 lines.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Kalley - I do have a direct path to the layer earlier in my code. Its just not shown here since the code is fairly long.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Mar 2013 19:45:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/using-update-cursor-in-for-loop-error/m-p/544936#M42501</guid>
      <dc:creator>RachelAlbritton1</dc:creator>
      <dc:date>2013-03-13T19:45:45Z</dc:date>
    </item>
    <item>
      <title>Re: Using Update Cursor in For Loop - error</title>
      <link>https://community.esri.com/t5/python-questions/using-update-cursor-in-for-loop-error/m-p/544937#M42502</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Here's my entire code&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;PRE&gt;&lt;/PRE&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;import arcpy, os&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;arcpy.env.workspace = "P:/Environmental Division/The Nature Conservancy/TNC GIS Data/TNC GIS Projects/RCW" &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;arcpy.env.overwriteOutput = True&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;outputWorkspace = "P:/Environmental Division/The Nature Conservancy/TNC GIS Data/TNC GIS Projects/RCW/RCW_Scratch"&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;def outName(input,post="_Output"):&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; """Returns output name."""&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; outName=os.path.basename(input).split(".")[0]+post&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; return outName&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;#Criteria 1: Number of 3-mile RCW dispersal buffers that intersect parcel&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;#Create 3 mile buffers around each RCW cluster&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Cluster = "RCW_Cluster.shp"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;CBuffersFC = outputWorkspace+"/"+ outName(Cluster, "_3miBuff.shp") &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;bufferDist = "3 miles"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;arcpy.Buffer_analysis(Cluster, CBuffersFC,bufferDist)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;#Create Feature Layers from Feature Classes&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;parcelsFC = "ACUB_3mile.shp"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;parcelsFL = outName(parcelsFC,"_Layer")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;CbuffersFL = outName(CBuffersFC,"_Layer")&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;arcpy.MakeFeatureLayer_management(parcelsFC, parcelsFL)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;arcpy.MakeFeatureLayer_management(CBuffersFC, CbuffersFL)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;#From these buffers, select out all buffers that intersect with at least 1 ACUB parcel in priority zone 1&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;#Note - since RCW Clusters may move, be added, or taken away, this step should be part of the analysis and not preprocessing&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;arcpy.SelectLayerByLocation_management(CbuffersFL,"INTERSECT",parcelsFL)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;parcelCount=int(arcpy.GetCount_management(CbuffersFL).getOutput(0))&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;print arcpy.GetMessages()&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;print "There are ",parcelCount," cluster buffers that intersect with at least 1 ACUB parcel. These parcels are being exported to a new feature class.\n"&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;#Copy Selected 3-Mile Cluster Buffer to a New Feature Class&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;FinalClusterBuff = outputWorkspace+"/"+ outName(CBuffersFC, "_Selected.shp") &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;arcpy.CopyFeatures_management(CbuffersFL,FinalClusterBuff)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;print FinalClusterBuff, "created\n"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;arcpy.AddMessage(FinalClusterBuff+" created")&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;#Before begining criteria analysis, code will check the attribute field names in the parcels table to ensure that attribute&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;#columns exist to hold analysis results for criteria's 1 - 5. If the field does not exist, one will be created.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;RCWfieldList = ["three_mi","avg_gs","PGB_avg","one_25mi","pot_hab"]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;ParcelFieldList=arcpy.ListFields(parcelsFC)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;for RCWfield in RCWfieldList:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if RCWfield in ParcelFieldList:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; print "Field", RCWfield, "found in", parcelsFC&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.AddMessage("Field " + RCWfield + " found in " + parcelsFC)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; else: # else the fieldname is not yet a field in the table, field will be added&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; print"Field", RCWfield, "NOT found in", parcelsFC&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.AddMessage("\nField " + RCWfield + " NOT found in " + parcelsFC)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.AddField_management(parcelsFC, RCWfield, "DOUBLE")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; print RCWfield, "created"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.AddMessage(RCWfield+" created/n")&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;#Select out each parcel record one by one and evalauate how many cluster buffers intersect with that parcel.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;#Update Parcel Attribute Table field three_mi with the # of buffers that intersect that parcel&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;for parcel in range(0,1092):&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; FID = "FID=%s" % (parcel)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.SelectLayerByAttribute_management(parcelsFL,"NEW_SELECTION",FID)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.SelectLayerByLocation_management(CbuffersFL,"INTERSECT",parcelsFL)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; bufferCount = int(arcpy.GetCount_management(CbuffersFL).getOutput(0))&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; uc=arcpy.UpdateCursor(parcel)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; for line in uc:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; line.three_mi = bufferCount&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; uc.updateRow(line) #Actually changes the table values to buffer count&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; del line&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; del uc&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; #print "There are", bufferCount, "buffers that intersect with parcel FID #", FID&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.SelectLayerByAttribute_management(parcelsFL,"CLEAR_SELECTION")&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;[\CODE]&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Mar 2013 19:50:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/using-update-cursor-in-for-loop-error/m-p/544937#M42502</guid>
      <dc:creator>RachelAlbritton1</dc:creator>
      <dc:date>2013-03-13T19:50:49Z</dc:date>
    </item>
    <item>
      <title>Re: Using Update Cursor in For Loop - error</title>
      <link>https://community.esri.com/t5/python-questions/using-update-cursor-in-for-loop-error/m-p/544938#M42503</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Sorry, I should have been more clear...&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I was refering to line 68 (I think, based on the error message in your initial post) that was:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; uc=arcpy.UpdateCursor(parcel)&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;SPAN&gt;Because 'parcel' is an integer, the UpdateCursor wasn't being created.&amp;nbsp; It was just my guess that the data you wanted the cursor to access was your parcelsFL feature layer.&amp;nbsp; If that is the case, you can replace 'parcel' in your line that matches the one I pasted above with 'parcelsFL', like this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; uc=arcpy.UpdateCursor(parcelsFL)&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;SPAN&gt;Regardless of what dataset you want to access with your cursor, you need to refer to it by its path which is a string.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Hope that clarifies what I was trying to say!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Mar 2013 20:15:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/using-update-cursor-in-for-loop-error/m-p/544938#M42503</guid>
      <dc:creator>KerryAlley</dc:creator>
      <dc:date>2013-03-13T20:15:37Z</dc:date>
    </item>
    <item>
      <title>Re: Using Update Cursor in For Loop - error</title>
      <link>https://community.esri.com/t5/python-questions/using-update-cursor-in-for-loop-error/m-p/544939#M42504</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Kalley - Thank you for the clarification. That worked!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Mar 2013 12:23:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/using-update-cursor-in-for-loop-error/m-p/544939#M42504</guid>
      <dc:creator>RachelAlbritton1</dc:creator>
      <dc:date>2013-03-14T12:23:20Z</dc:date>
    </item>
    <item>
      <title>Re: Using Update Cursor in For Loop - error</title>
      <link>https://community.esri.com/t5/python-questions/using-update-cursor-in-for-loop-error/m-p/544940#M42505</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;What is line 362?&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This is coming from the ArcObjects conversion to a Python function.&amp;nbsp; You can actually open up the "base.py" script from the program files to view it. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
def updateCursor(self, *args):
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; """GP function UpdateCursor"""
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; from ..arcobjects.arcobjectconversion import convertArcObjectToPythonObject
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return convertArcObjectToPythonObject(
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; self._gp.UpdateCursor(*gp_fixargs(args, True)))
&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;This is how most of the arcpy tools are converted to python functions.&amp;nbsp; This is the update cursor ArcObject conversion into the geoprocessing wrapper.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 23:34:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/using-update-cursor-in-for-loop-error/m-p/544940#M42505</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2021-12-11T23:34:40Z</dc:date>
    </item>
  </channel>
</rss>

