<?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: ListFeatureClasses comes back empty in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/listfeatureclasses-comes-back-empty/m-p/177884#M13681</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Your script works ok.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Does your third dataset (Python index = 2) contain polygon feature classes?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Maybe try checking lstPOLY in this way:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;for fc in lstPOLY:
&amp;nbsp;&amp;nbsp;&amp;nbsp; print fc&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 11 Dec 2021 09:08:21 GMT</pubDate>
    <dc:creator>MarcinGasior</dc:creator>
    <dc:date>2021-12-11T09:08:21Z</dc:date>
    <item>
      <title>ListFeatureClasses comes back empty</title>
      <link>https://community.esri.com/t5/python-questions/listfeatureclasses-comes-back-empty/m-p/177883#M13680</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Dear all,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have a problem that comes and go's. Currently is is again immanent and I wonder what's causing it.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Working with ArcGIS 10 and using straight the IDLE from Python...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;&amp;gt;&amp;gt;&amp;gt; import arcpy
&amp;gt;&amp;gt;&amp;gt; from arcpy import env
&amp;gt;&amp;gt;&amp;gt; env.workspace = r"Path\\to\\database.gdb"
&amp;gt;&amp;gt;&amp;gt; lstFDS = arcpy.ListDatasets("*", "FEATURES") # returns list of three items - correct
&amp;gt;&amp;gt;&amp;gt; lstPOLY = arcpy.ListFeatureClasses("*", "POLYGON", lstFDS[2])
&amp;gt;&amp;gt;&amp;gt; lstPOLY
[]&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The dataset requested is holding almost 200 feature classes, all of them loaded with polygons.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I see all of them in ArcCatalog, but not in Python!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Anybody an idea? I already had a took care of remaining objects and invoked the garbage collector by hand but nothing.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Cheers Thomas&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Oct 2012 08:44:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/listfeatureclasses-comes-back-empty/m-p/177883#M13680</guid>
      <dc:creator>TomGeo</dc:creator>
      <dc:date>2012-10-11T08:44:52Z</dc:date>
    </item>
    <item>
      <title>Re: ListFeatureClasses comes back empty</title>
      <link>https://community.esri.com/t5/python-questions/listfeatureclasses-comes-back-empty/m-p/177884#M13681</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Your script works ok.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Does your third dataset (Python index = 2) contain polygon feature classes?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Maybe try checking lstPOLY in this way:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;for fc in lstPOLY:
&amp;nbsp;&amp;nbsp;&amp;nbsp; print fc&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 09:08:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/listfeatureclasses-comes-back-empty/m-p/177884#M13681</guid>
      <dc:creator>MarcinGasior</dc:creator>
      <dc:date>2021-12-11T09:08:21Z</dc:date>
    </item>
    <item>
      <title>Re: ListFeatureClasses comes back empty</title>
      <link>https://community.esri.com/t5/python-questions/listfeatureclasses-comes-back-empty/m-p/177885#M13682</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The print loop comes back empty as well...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The weird thing is that one day there are no problems with it and the other one I have the stuff going on that currently happens. I restarted the machine, took care of unused objects etc.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The script works and some time the machine has ha bad day and isn't cooperating. :confused:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It's installed on a Windows Server 2008 R2, has plenty of RAM and memory on the HDD...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;However, I created a new File Geodatabase, created the Feature Datasests and copied all the Feature Classes into the new GDB... now it works!?!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thomas&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Oct 2012 09:36:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/listfeatureclasses-comes-back-empty/m-p/177885#M13682</guid>
      <dc:creator>TomGeo</dc:creator>
      <dc:date>2012-10-11T09:36:06Z</dc:date>
    </item>
  </channel>
</rss>

