<?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: arcpy.da.UpdateCursor too few parameters in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/arcpy-da-updatecursor-too-few-parameters/m-p/185091#M14255</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Just for future reference, you can format your code with syntax highlighting so it looks like it does in the IDE and is easier to read.&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.esri.com/migration-blogpost/1070"&gt;Posting Code blocks in the new GeoNet&lt;/A&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 16 Mar 2016 19:35:03 GMT</pubDate>
    <dc:creator>BlakeTerhune</dc:creator>
    <dc:date>2016-03-16T19:35:03Z</dc:date>
    <item>
      <title>arcpy.da.UpdateCursor too few parameters</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-da-updatecursor-too-few-parameters/m-p/185086#M14250</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm running ArcGIS 10.3 and have a geodatabase with multiple feature datasets each containing multiple feature classes.&amp;nbsp; Each feature class has multiple string type fields containing &amp;lt;Null&amp;gt; values.&amp;nbsp; I want to change the &amp;lt;Null&amp;gt; values to "TBD" (without the quotation marks).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I feel I'm very close, but at 'for row in cursor:' I'm receiving the error "Too few parameters.&amp;nbsp; Expected 1."&amp;nbsp; I guess the cursor isn't actually returning any rows at all?&amp;nbsp; Below is what I currently have; I haven't added any documentation or messaging yet.&amp;nbsp; Any help would be greatly appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;import arcpy
from arcpy import env
import os

#Set variables
inputgdb = sys.argv[1]
nullCount = 0

#Set workspace
arcpy.env.workspace = inputgdb

#Populate Nulls with TBD
datasetList = arcpy.ListDatasets(feature_type = 'feature')
datasetList = [''] + datasetList if datasetList is not None else []
for dataset in datasetList:
&amp;nbsp;&amp;nbsp;&amp;nbsp; env.workspace = inputgdb + "\\" + dataset
&amp;nbsp;&amp;nbsp;&amp;nbsp; dataset = dataset + "\\"
&amp;nbsp;&amp;nbsp;&amp;nbsp; fcList = arcpy.ListFeatureClasses()
&amp;nbsp;&amp;nbsp;&amp;nbsp; for fc in fcList:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; fc = fc +"\\"
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; fieldList = arcpy.ListFields(fc,["String"])
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for field in fieldList:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; with arcpy.da.UpdateCursor (fc, 'fieldList') as cursor:
&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; for row in cursor:
&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; if row[0] == None:
&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; row[0] = 'TBD'
&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cursor.updateRow(row)&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 09:23:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-da-updatecursor-too-few-parameters/m-p/185086#M14250</guid>
      <dc:creator>JustinWolff</dc:creator>
      <dc:date>2021-12-11T09:23:24Z</dc:date>
    </item>
    <item>
      <title>Re: arcpy.da.UpdateCursor too few parameters</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-da-updatecursor-too-few-parameters/m-p/185087#M14251</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Through in some print statements &lt;/P&gt;&lt;P&gt;I would recommend:&lt;/P&gt;&lt;P&gt;print &lt;SPAN style="color: #3d3d3d; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;datasetList &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; print &lt;SPAN style="color: #3d3d3d; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;fc &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;print &lt;SPAN style="color: #3d3d3d; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;fieldList &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;after each has been assigned I don't think you are getting the values you are expecting &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Mar 2016 17:54:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-da-updatecursor-too-few-parameters/m-p/185087#M14251</guid>
      <dc:creator>WesMiller</dc:creator>
      <dc:date>2016-03-16T17:54:34Z</dc:date>
    </item>
    <item>
      <title>Re: arcpy.da.UpdateCursor too few parameters</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-da-updatecursor-too-few-parameters/m-p/185088#M14252</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You create a &lt;STRONG&gt;list&lt;/STRONG&gt; called fieldList, but then try to call a single field (&lt;STRONG&gt;string&lt;/STRONG&gt;) called 'fieldList'. Remove the quotes to access the variable fieldList, rather than the string 'fieldList'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;edit: actually, if you mean to loop through individual fields in fieldList, then you should direct the cursor to look for field (no quotes).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;edit 2: rather than cursoring through your feature classes for each string field, you should cursor through each feature class once and inspect the values in row.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Mar 2016 17:58:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-da-updatecursor-too-few-parameters/m-p/185088#M14252</guid>
      <dc:creator>DarrenWiens2</dc:creator>
      <dc:date>2016-03-16T17:58:09Z</dc:date>
    </item>
    <item>
      <title>Re: arcpy.da.UpdateCursor too few parameters</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-da-updatecursor-too-few-parameters/m-p/185089#M14253</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Darren,&lt;/P&gt;&lt;P&gt;I think he is trying to get field type string&lt;/P&gt;&lt;P&gt;field_names = [f.name for f in arcpy.ListFields(fc,'','String')]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edit:&lt;/P&gt;&lt;P&gt;Sorry just looked at your edit 2&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Mar 2016 18:15:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-da-updatecursor-too-few-parameters/m-p/185089#M14253</guid>
      <dc:creator>WesMiller</dc:creator>
      <dc:date>2016-03-16T18:15:33Z</dc:date>
    </item>
    <item>
      <title>Re: arcpy.da.UpdateCursor too few parameters</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-da-updatecursor-too-few-parameters/m-p/185090#M14254</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Darren and Wes,&lt;/P&gt;&lt;P&gt;Thanks for the suggestions.&amp;nbsp; I did add some messaging and it is at least returning the feature datasets, feature classes and fields as I was anticipating. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I understand Darren's edit 2, I don't need to cursor through a list of fields, just the list of feature classes?&lt;/P&gt;&lt;P&gt;Thanks again.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Mar 2016 19:31:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-da-updatecursor-too-few-parameters/m-p/185090#M14254</guid>
      <dc:creator>JustinWolff</dc:creator>
      <dc:date>2016-03-16T19:31:02Z</dc:date>
    </item>
    <item>
      <title>Re: arcpy.da.UpdateCursor too few parameters</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-da-updatecursor-too-few-parameters/m-p/185091#M14255</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Just for future reference, you can format your code with syntax highlighting so it looks like it does in the IDE and is easier to read.&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.esri.com/migration-blogpost/1070"&gt;Posting Code blocks in the new GeoNet&lt;/A&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Mar 2016 19:35:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-da-updatecursor-too-few-parameters/m-p/185091#M14255</guid>
      <dc:creator>BlakeTerhune</dc:creator>
      <dc:date>2016-03-16T19:35:03Z</dc:date>
    </item>
    <item>
      <title>Re: arcpy.da.UpdateCursor too few parameters</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-da-updatecursor-too-few-parameters/m-p/185092#M14256</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #3d3d3d;"&gt;Right, I &lt;EM&gt;believe&lt;/EM&gt; creating cursors is an expensive operation, so the fewer the better.&lt;/P&gt;&lt;P style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;for dataset in datasetList:
&amp;nbsp;&amp;nbsp;&amp;nbsp; env.workspace = inputgdb + "\\" + dataset
&amp;nbsp;&amp;nbsp;&amp;nbsp; dataset = dataset + "\\"
&amp;nbsp;&amp;nbsp;&amp;nbsp; fcList = arcpy.ListFeatureClasses()
&amp;nbsp;&amp;nbsp;&amp;nbsp; for fc in fcList:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; fc = fc +"\\"
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; fieldList = arcpy.ListFields(fc,["String"])
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #3d3d3d; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;with arcpy.da.UpdateCursor (fc, fieldList) as cursor:&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for row in cursor: # for each row in the feature class
&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; for i in len(row): # for each value in row (i.e. field values)
&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; if row&lt;I&gt; == None:
&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; row&lt;I&gt; = 'TBD'
&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; cursor.updateRow(row)&lt;/I&gt;&lt;/I&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 09:23:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-da-updatecursor-too-few-parameters/m-p/185092#M14256</guid>
      <dc:creator>DarrenWiens2</dc:creator>
      <dc:date>2021-12-11T09:23:27Z</dc:date>
    </item>
    <item>
      <title>Re: arcpy.da.UpdateCursor too few parameters</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-da-updatecursor-too-few-parameters/m-p/185093#M14257</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Correct.&amp;nbsp; As a side note, you should really consider using the &lt;A href="https://docs.python.org/2/library/os.path.html" rel="nofollow noopener noreferrer" target="_blank"&gt;os.path &lt;/A&gt;module to create file system paths (like feature classes in feature datasets).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Starting at the fieldList statement towards the bottom of your script:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;fieldList = [f.name for f in arcpy.ListFields(fc, "*", "STRING")]
with arcpy.da.UpdateCursor (fc, fieldList) as cursor:
&amp;nbsp;&amp;nbsp;&amp;nbsp; for row in cursor:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; row = [(fld if fld is not None else 'TBD') for fld in row]
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # row = [(fld if fld else 'TBD') for fld in row] # this would capture empty strings too and not just NULL
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cursor.updateRow(row)&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 09:23:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-da-updatecursor-too-few-parameters/m-p/185093#M14257</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2021-12-11T09:23:30Z</dc:date>
    </item>
    <item>
      <title>Re: arcpy.da.UpdateCursor too few parameters</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-da-updatecursor-too-few-parameters/m-p/185094#M14258</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Blake - applied to original post.&amp;nbsp; Working through the other suggestions/help now.&amp;nbsp; Much appreciated.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Mar 2016 20:09:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-da-updatecursor-too-few-parameters/m-p/185094#M14258</guid>
      <dc:creator>JustinWolff</dc:creator>
      <dc:date>2016-03-16T20:09:40Z</dc:date>
    </item>
    <item>
      <title>Re: arcpy.da.UpdateCursor too few parameters</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-da-updatecursor-too-few-parameters/m-p/185095#M14259</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think I'm getting closer, but it does not like the fieldList in cursor.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="error_field_names_string.png" class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/191278_error_field_names_string.png" style="width: 620px; height: 371px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;import arcpy
from arcpy import env
import os
#Set variables
inputgdb = sys.argv[1]
nullCount = 0
#Set workspace
arcpy.env.workspace = inputgdb
#Populate Nulls with TBD
datasetList = arcpy.ListDatasets(feature_type = 'feature')
datasetList = [''] + datasetList if datasetList is not None else []
print "Getting Feature Datasets..."
arcpy.AddMessage ("Getting Feature Datasets...")
print datasetList
arcpy.AddMessage (datasetList)
for dataset in datasetList:
&amp;nbsp;&amp;nbsp;&amp;nbsp; env.workspace = inputgdb + "\\" + dataset
&amp;nbsp;&amp;nbsp;&amp;nbsp; dataset = dataset + "\\"
&amp;nbsp;&amp;nbsp;&amp;nbsp; fcList = arcpy.ListFeatureClasses()
&amp;nbsp;&amp;nbsp;&amp;nbsp; print "Getting Feature Classes..."
&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.AddMessage ("Getting Feature Classes...")
&amp;nbsp;&amp;nbsp;&amp;nbsp; print fcList
&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.AddMessage (fcList)
&amp;nbsp;&amp;nbsp;&amp;nbsp; for fc in fcList:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; fc = fc +"\\"
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; fieldList = arcpy.ListFields(fc,["String"])
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; with arcpy.da.UpdateCursor (fc, fieldList) as cursor:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for row in cursor: #for each row in the feature class
&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; for i in len(row): #for each value in row (i.e., field values)
&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; if row&lt;I&gt; == None:
&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; row&lt;I&gt; = 'TBD'
&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; cursor.updateRow(row)
&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; print "Updating value..."
&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; arcpy.AddMessage ("Updating value...")
&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; print fieldList
&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; arcpy.AddMessage (fieldList)&lt;/I&gt;&lt;/I&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 09:23:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-da-updatecursor-too-few-parameters/m-p/185095#M14259</guid>
      <dc:creator>JustinWolff</dc:creator>
      <dc:date>2021-12-11T09:23:33Z</dc:date>
    </item>
    <item>
      <title>Re: arcpy.da.UpdateCursor too few parameters</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-da-updatecursor-too-few-parameters/m-p/185096#M14260</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ah, I assumed ListFields returned a list of field names, but it returns field objects. See Joshua's answer or the &lt;A href="https://pro.arcgis.com/en/pro-app/arcpy/functions/listfields.htm"&gt;final example here&lt;/A&gt; for creating a list of field names from ListFields.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Mar 2016 21:02:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-da-updatecursor-too-few-parameters/m-p/185096#M14260</guid>
      <dc:creator>DarrenWiens2</dc:creator>
      <dc:date>2016-03-16T21:02:01Z</dc:date>
    </item>
    <item>
      <title>Re: arcpy.da.UpdateCursor too few parameters</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-da-updatecursor-too-few-parameters/m-p/185097#M14261</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you so much to everyone; it's working.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;import arcpy
from arcpy import env
import os
#Set variables
inputgdb = sys.argv[1]
nullCount = 0
#Set workspace
arcpy.env.workspace = inputgdb
#Populate Nulls with TBD
datasetList = arcpy.ListDatasets(feature_type = 'feature')
datasetList = [''] + datasetList if datasetList is not None else []
print "Getting Feature Datasets..."
arcpy.AddMessage ("Getting Feature Datasets...")
print datasetList
arcpy.AddMessage (datasetList)
for dataset in datasetList:
&amp;nbsp;&amp;nbsp;&amp;nbsp; env.workspace = inputgdb + "\\" + dataset
&amp;nbsp;&amp;nbsp;&amp;nbsp; dataset = dataset + "\\"
&amp;nbsp;&amp;nbsp;&amp;nbsp; fcList = arcpy.ListFeatureClasses()
&amp;nbsp;&amp;nbsp;&amp;nbsp; print "Getting Feature Classes..."
&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.AddMessage ("Getting Feature Classes...")
&amp;nbsp;&amp;nbsp;&amp;nbsp; print fcList
&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.AddMessage (fcList)
&amp;nbsp;&amp;nbsp;&amp;nbsp; for fc in fcList:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; fc = fc +"\\"
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; fieldList = [f.name for f in arcpy.ListFields(fc, "*", "STRING")]
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; with arcpy.da.UpdateCursor (fc, fieldList) as cursor:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for row in cursor:
&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; row = [(fld if fld is not None else 'TBD') for fld in row]
&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; cursor.updateRow(row)
&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; print "Updating value..."
&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; arcpy.AddMessage ("Updating value...")
&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; print fieldList
&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; arcpy.AddMessage (fieldList)&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 09:23:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-da-updatecursor-too-few-parameters/m-p/185097#M14261</guid>
      <dc:creator>JustinWolff</dc:creator>
      <dc:date>2021-12-11T09:23:36Z</dc:date>
    </item>
  </channel>
</rss>

