<?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 None Type not Iterable:  How to Resolve? in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/none-type-not-iterable-how-to-resolve/m-p/1017260#M59540</link>
    <description>&lt;P&gt;This is for ArcGIS Desktop 10.8.1, Python 2.7.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The purpose of this script is to examine Attribute Tables associated with a set of Feature Classes and to extract from those tables a set of fields, writing those fields to a single csv file.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2021-01-14_15-53-49.png" style="width: 907px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/3947iC86578685FA48C32/image-size/large?v=v2&amp;amp;px=999" role="button" title="2021-01-14_15-53-49.png" alt="2021-01-14_15-53-49.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;The following script threw the error “&lt;I&gt;’None Type’ object is not iterable&lt;/I&gt;” that was flagged on Line 20, highlighted in the figure below.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;After reading several threads about &lt;I&gt;None Type&lt;/I&gt; [&lt;A href="https://community.esri.com/t5/python-documents/much-ado-about-nothing/ta-p/914798" target="_blank" rel="noopener"&gt;here’s one&lt;/A&gt; from Geonet] I’ve decided that I’m just not smart enough to sort this out by myself nor have sufficient experience with Python to do so.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2021-01-14_15-53-49.png" style="width: 907px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/3946i3E04B8FFF7770B11/image-size/large?v=v2&amp;amp;px=999" role="button" title="2021-01-14_15-53-49.png" alt="2021-01-14_15-53-49.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here’s what I’ve done to narrow things down:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;P&gt;Ran a script to print out the FC’s that would be listed by line 12. This gave me the expected answer.&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;Checked to make sure that the field names listed on line 26 were spelled and capitalized correctly. They were and were able to produce a csv file for a &lt;U&gt;single&lt;/U&gt; FC.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;To get to this point, I’ve been the beneficiary of help from several Geonet denizens for which I am very grateful. I hate to keep asking and not giving, but here I am and would be grateful, yet again, for some suggestion or two about what I should be looking for to resolve this error.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 15 Jan 2021 16:02:17 GMT</pubDate>
    <dc:creator>WilliamCole</dc:creator>
    <dc:date>2021-01-15T16:02:17Z</dc:date>
    <item>
      <title>None Type not Iterable:  How to Resolve?</title>
      <link>https://community.esri.com/t5/python-questions/none-type-not-iterable-how-to-resolve/m-p/1017260#M59540</link>
      <description>&lt;P&gt;This is for ArcGIS Desktop 10.8.1, Python 2.7.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The purpose of this script is to examine Attribute Tables associated with a set of Feature Classes and to extract from those tables a set of fields, writing those fields to a single csv file.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2021-01-14_15-53-49.png" style="width: 907px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/3947iC86578685FA48C32/image-size/large?v=v2&amp;amp;px=999" role="button" title="2021-01-14_15-53-49.png" alt="2021-01-14_15-53-49.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;The following script threw the error “&lt;I&gt;’None Type’ object is not iterable&lt;/I&gt;” that was flagged on Line 20, highlighted in the figure below.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;After reading several threads about &lt;I&gt;None Type&lt;/I&gt; [&lt;A href="https://community.esri.com/t5/python-documents/much-ado-about-nothing/ta-p/914798" target="_blank" rel="noopener"&gt;here’s one&lt;/A&gt; from Geonet] I’ve decided that I’m just not smart enough to sort this out by myself nor have sufficient experience with Python to do so.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2021-01-14_15-53-49.png" style="width: 907px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/3946i3E04B8FFF7770B11/image-size/large?v=v2&amp;amp;px=999" role="button" title="2021-01-14_15-53-49.png" alt="2021-01-14_15-53-49.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here’s what I’ve done to narrow things down:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;P&gt;Ran a script to print out the FC’s that would be listed by line 12. This gave me the expected answer.&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;Checked to make sure that the field names listed on line 26 were spelled and capitalized correctly. They were and were able to produce a csv file for a &lt;U&gt;single&lt;/U&gt; FC.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;To get to this point, I’ve been the beneficiary of help from several Geonet denizens for which I am very grateful. I hate to keep asking and not giving, but here I am and would be grateful, yet again, for some suggestion or two about what I should be looking for to resolve this error.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 15 Jan 2021 16:02:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/none-type-not-iterable-how-to-resolve/m-p/1017260#M59540</guid>
      <dc:creator>WilliamCole</dc:creator>
      <dc:date>2021-01-15T16:02:17Z</dc:date>
    </item>
    <item>
      <title>Re: None Type not Iterable:  How to Resolve?</title>
      <link>https://community.esri.com/t5/python-questions/none-type-not-iterable-how-to-resolve/m-p/1017263#M59541</link>
      <description>&lt;P&gt;It's because fclist doesn't have any value; it's &lt;A href="https://docs.python.org/3/c-api/none.html" target="_self"&gt;None&lt;/A&gt;. I suspect this is caused by you listing feature classes without setting an environment workspace. You can print(fclist) for debugging to verify. Where you have the comment that says "Set the workspace for ListFeatureClasses" you need to actually set the workspace&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;workingDir = r"\\PANDA\..."
WorkingGDB = os.path.join(workingDir, "Burgess.mdb")
arcpy.env.workspace = workingGDB
fclist = arcpy.ListFeatureClasses("Ro*03")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 15 Jan 2021 16:11:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/none-type-not-iterable-how-to-resolve/m-p/1017263#M59541</guid>
      <dc:creator>BlakeTerhune</dc:creator>
      <dc:date>2021-01-15T16:11:47Z</dc:date>
    </item>
    <item>
      <title>Re: None Type not Iterable:  How to Resolve?</title>
      <link>https://community.esri.com/t5/python-questions/none-type-not-iterable-how-to-resolve/m-p/1017517#M59551</link>
      <description>&lt;P&gt;Thanks very much.&amp;nbsp; This solved that problem.&amp;nbsp; Looks like I need some more time learning the details of Python.&amp;nbsp; Be well, Bill Cole&lt;/P&gt;</description>
      <pubDate>Sun, 17 Jan 2021 15:06:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/none-type-not-iterable-how-to-resolve/m-p/1017517#M59551</guid>
      <dc:creator>WilliamCole</dc:creator>
      <dc:date>2021-01-17T15:06:52Z</dc:date>
    </item>
  </channel>
</rss>

