<?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 AttributeError: 'list' object has no attribute 'setValue' ? in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/attributeerror-list-object-has-no-attribute/m-p/8415#M690</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Don't know how to get rid of that message?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;input_shp = fc
arr = arcpy.Array()&amp;nbsp; 
with arcpy.da.UpdateCursor(input_shp,['FID','SHAPE@']) as cur:&amp;nbsp; 
&amp;nbsp; extents = []&amp;nbsp;&amp;nbsp; 
&amp;nbsp; for row in cur:&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; ext = row[1].extent&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; p0 = ext.lowerLeft; p1 = ext.upperRight&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; print('Extent of shape... {}: '.format(row[0]))&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; print(' X min/max&amp;nbsp; {}, {}'.format(ext.XMin,ext.XMax))
&amp;nbsp;&amp;nbsp;&amp;nbsp; Xmin = round((ext.XMin), 0)
&amp;nbsp;&amp;nbsp;&amp;nbsp; print (Xmin)
&amp;nbsp;&amp;nbsp;&amp;nbsp; row.setValue(fld_xmin, Xmin)
&amp;nbsp;&amp;nbsp;&amp;nbsp; print ( ' X min, {}'.format(ext.XMin))
&amp;nbsp;&amp;nbsp;&amp;nbsp; curs.updateRow(row)
&amp;nbsp;&amp;nbsp;&amp;nbsp; print(' Y min/max&amp;nbsp; {}, {}'.format(ext.YMin,ext.YMax))&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; arr.add(p0)&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; arr.add(p1)&amp;nbsp; 
mp = arcpy.Multipoint(arr)&amp;nbsp; 
print('Extent of all {}'.format(mp.extent)) &lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 10 Dec 2021 20:20:35 GMT</pubDate>
    <dc:creator>JohannesBierer</dc:creator>
    <dc:date>2021-12-10T20:20:35Z</dc:date>
    <item>
      <title>AttributeError: 'list' object has no attribute 'setValue' ?</title>
      <link>https://community.esri.com/t5/python-questions/attributeerror-list-object-has-no-attribute/m-p/8415#M690</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Don't know how to get rid of that message?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;input_shp = fc
arr = arcpy.Array()&amp;nbsp; 
with arcpy.da.UpdateCursor(input_shp,['FID','SHAPE@']) as cur:&amp;nbsp; 
&amp;nbsp; extents = []&amp;nbsp;&amp;nbsp; 
&amp;nbsp; for row in cur:&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; ext = row[1].extent&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; p0 = ext.lowerLeft; p1 = ext.upperRight&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; print('Extent of shape... {}: '.format(row[0]))&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; print(' X min/max&amp;nbsp; {}, {}'.format(ext.XMin,ext.XMax))
&amp;nbsp;&amp;nbsp;&amp;nbsp; Xmin = round((ext.XMin), 0)
&amp;nbsp;&amp;nbsp;&amp;nbsp; print (Xmin)
&amp;nbsp;&amp;nbsp;&amp;nbsp; row.setValue(fld_xmin, Xmin)
&amp;nbsp;&amp;nbsp;&amp;nbsp; print ( ' X min, {}'.format(ext.XMin))
&amp;nbsp;&amp;nbsp;&amp;nbsp; curs.updateRow(row)
&amp;nbsp;&amp;nbsp;&amp;nbsp; print(' Y min/max&amp;nbsp; {}, {}'.format(ext.YMin,ext.YMax))&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; arr.add(p0)&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; arr.add(p1)&amp;nbsp; 
mp = arcpy.Multipoint(arr)&amp;nbsp; 
print('Extent of all {}'.format(mp.extent)) &lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 20:20:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/attributeerror-list-object-has-no-attribute/m-p/8415#M690</guid>
      <dc:creator>JohannesBierer</dc:creator>
      <dc:date>2021-12-10T20:20:35Z</dc:date>
    </item>
    <item>
      <title>Re: AttributeError: 'list' object has no attribute 'setValue' ?</title>
      <link>https://community.esri.com/t5/python-questions/attributeerror-list-object-has-no-attribute/m-p/8416#M691</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I believe you need to change "row.setValue(fld_xmin,Xmin)" to row[1].setValue(fld_xmin,Xmin)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Jan 2015 16:10:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/attributeerror-list-object-has-no-attribute/m-p/8416#M691</guid>
      <dc:creator>ChrisMowry</dc:creator>
      <dc:date>2015-01-28T16:10:23Z</dc:date>
    </item>
    <item>
      <title>Re: AttributeError: 'list' object has no attribute 'setValue' ?</title>
      <link>https://community.esri.com/t5/python-questions/attributeerror-list-object-has-no-attribute/m-p/8417#M692</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think you are having copy and paste issues&lt;/P&gt;&lt;P&gt;curs.updateRow(row)&lt;/P&gt;&lt;P&gt;where is &lt;STRONG&gt;curs&lt;/STRONG&gt; defined?&lt;/P&gt;&lt;P&gt;I used &lt;STRONG&gt;cur&lt;/STRONG&gt; in my response to your previous post&amp;nbsp; &lt;A href="https://community.esri.com/thread/120703"&gt;What means: TypeError: 'Row' object does not support indexing ???&lt;/A&gt; which still isn't closed and builds upon my code&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Jan 2015 19:10:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/attributeerror-list-object-has-no-attribute/m-p/8417#M692</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2015-01-28T19:10:04Z</dc:date>
    </item>
    <item>
      <title>Re: AttributeError: 'list' object has no attribute 'setValue' ?</title>
      <link>https://community.esri.com/t5/python-questions/attributeerror-list-object-has-no-attribute/m-p/8418#M693</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;OK moved there:&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.esri.com/thread/120703"&gt;What means: TypeError: 'Row' object does not support indexing ???&lt;/A&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Jan 2015 06:38:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/attributeerror-list-object-has-no-attribute/m-p/8418#M693</guid>
      <dc:creator>JohannesBierer</dc:creator>
      <dc:date>2015-01-29T06:38:30Z</dc:date>
    </item>
  </channel>
</rss>

