<?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() fails since 10.2 upgrade in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/listfeatureclasses-fails-since-10-2-upgrade/m-p/377832#M29794</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Do you have any other datasets in your geodatabase that are not "Feature Datasets"?&amp;nbsp; Many types of things are in the high level group called Dataset.&amp;nbsp; I've tested the code on 10.2.1 and the last items that are displayed are "raster datasets" which if you change the code slightly to&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;print "Adding:", dataset, arcpy.ListFeatureClasses(feature_dataset=dataset)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you should be able to prove.&amp;nbsp; If you run ListFeatureClasses on a Raster Dataset there will be none and you'll get an empty list. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you're getting an error is it possible yet another dataset type that is not in my test dataset does not fail quite so gracefully when you run ListFeatureClasses on it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try changing your ListDatasets line to be&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for dataset in arcpy.ListDatasets("*", "Feature"):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//000v0000001m000000" title="http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//000v0000001m000000"&gt;ArcGIS Desktop List&lt;/A&gt;Datasets &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 13 Jan 2015 19:57:15 GMT</pubDate>
    <dc:creator>TimDine</dc:creator>
    <dc:date>2015-01-13T19:57:15Z</dc:date>
    <item>
      <title>ListFeatureClasses() fails since 10.2 upgrade</title>
      <link>https://community.esri.com/t5/python-questions/listfeatureclasses-fails-since-10-2-upgrade/m-p/377830#M29792</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Since upgrading to 10.2 the script I ran weekly for ArcSDE maintenance fails with an "Invalid floating point operation" error during the loop shown below:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;# Get a list of all the datasets.
# First, get all the stand alone tables, feature classes and rasters.
dataList = arcpy.ListFeatureClasses() + arcpy.ListRasters()

# Next, for feature datasets get all of the featureclasses
# from the list and add them to the master list.
for dataset in arcpy.ListDatasets():
&amp;nbsp;&amp;nbsp;&amp;nbsp; print "Adding:", arcpy.ListFeatureClasses(feature_dataset=dataset)
&amp;nbsp;&amp;nbsp;&amp;nbsp; dataList += arcpy.ListFeatureClasses(feature_dataset=dataset)
# Execute the ReconcileVersions tool.
arcpy.ReconcileVersions_management(workspace,"ALL_VERSIONS","SDE.Default",verList,"NO_LOCK_ACQUIRED","NO_ABORT","BY_ATTRIBUTE","FAVOR_TARGET_VERSION","NO_POST","KEEP_VERSION")&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I had inserted the print statement only for debugging purposes, and when I ran the script, the last few lines output by the statement were:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Adding: [u'bc.GIS_ADMIN.landuse_zoning']&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Adding: [u'bc.GIS_ADMIN.dimensions', u'bc.GIS_ADMIN.dimension_2']&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Adding: [u'bc.GIS_ADMIN.traffic_lights', u'bc.GIS_ADMIN.valves', u'bc.GIS_ADMIN.StormStructures', u'bc.GIS_ADMIN.signs', u'bc.GIS_ADMIN.sidewalks', u'bc.GIS_ADMIN.manholes', u'bc.GIS_ADMIN.light_standard', u'bc.GIS_ADMIN.hydro_pole', u'bc.GIS_ADMIN.hydrants', u'bc.GIS_ADMIN.decorative_light_standard', u'bc.GIS_ADMIN.curb_gutter', u'bc.GIS_ADMIN.culverts', u'bc.GIS_ADMIN.bridge']&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Adding: []&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Adding: []&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Adding:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm puzzled as to why the loop prints two empty strings ([]) followed by nothing, just before raising the floating point error. All feature classes within feature datasets are successfully listed ahead of these empty ones in the print output. I suspect these blank lines might be the cause of the error, but I see lots of "Unknown function at" lines in the error details. I think it might be in the Reconcile where the error occurs.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Is there something I need to do to make this work, or in other words, enable 10.1 python code to run at 10.2?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Dec 2013 15:41:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/listfeatureclasses-fails-since-10-2-upgrade/m-p/377830#M29792</guid>
      <dc:creator>deleted-user-zpcJw1u0IXiO</dc:creator>
      <dc:date>2013-12-12T15:41:06Z</dc:date>
    </item>
    <item>
      <title>Re: ListFeatureClasses() fails since 10.2 upgrade</title>
      <link>https://community.esri.com/t5/python-questions/listfeatureclasses-fails-since-10-2-upgrade/m-p/377831#M29793</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Justin, did you ever resolve what was going on with this? -W&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Jan 2015 19:11:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/listfeatureclasses-fails-since-10-2-upgrade/m-p/377831#M29793</guid>
      <dc:creator>Waan</dc:creator>
      <dc:date>2015-01-13T19:11:29Z</dc:date>
    </item>
    <item>
      <title>Re: ListFeatureClasses() fails since 10.2 upgrade</title>
      <link>https://community.esri.com/t5/python-questions/listfeatureclasses-fails-since-10-2-upgrade/m-p/377832#M29794</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Do you have any other datasets in your geodatabase that are not "Feature Datasets"?&amp;nbsp; Many types of things are in the high level group called Dataset.&amp;nbsp; I've tested the code on 10.2.1 and the last items that are displayed are "raster datasets" which if you change the code slightly to&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;print "Adding:", dataset, arcpy.ListFeatureClasses(feature_dataset=dataset)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you should be able to prove.&amp;nbsp; If you run ListFeatureClasses on a Raster Dataset there will be none and you'll get an empty list. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you're getting an error is it possible yet another dataset type that is not in my test dataset does not fail quite so gracefully when you run ListFeatureClasses on it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try changing your ListDatasets line to be&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for dataset in arcpy.ListDatasets("*", "Feature"):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//000v0000001m000000" title="http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//000v0000001m000000"&gt;ArcGIS Desktop List&lt;/A&gt;Datasets &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Jan 2015 19:57:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/listfeatureclasses-fails-since-10-2-upgrade/m-p/377832#M29794</guid>
      <dc:creator>TimDine</dc:creator>
      <dc:date>2015-01-13T19:57:15Z</dc:date>
    </item>
    <item>
      <title>Re: ListFeatureClasses() fails since 10.2 upgrade</title>
      <link>https://community.esri.com/t5/python-questions/listfeatureclasses-fails-since-10-2-upgrade/m-p/377833#M29795</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Tim is right, you can have a raster dataset, in which you obviously won't find any featureclasses. You could try this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;import arcpy

# reference to you database
arcpy.env.workspace = r""

dataList = arcpy.ListTables()
dataList += arcpy.ListRasters()

fds = arcpy.ListDatasets(feature_type="Feature")
fds.append("")
for fd in fds:
&amp;nbsp;&amp;nbsp;&amp;nbsp; dataList += arcpy.ListFeatureClasses(feature_dataset=fd)

arcpy.ReconcileVersions_management(workspace,"ALL_VERSIONS","SDE.Default",verList,"NO_LOCK_ACQUIRED","NO_ABORT","BY_ATTRIBUTE","FAVOR_TARGET_VERSION","NO_POST","KEEP_VERSION")&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 17:26:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/listfeatureclasses-fails-since-10-2-upgrade/m-p/377833#M29795</guid>
      <dc:creator>XanderBakker</dc:creator>
      <dc:date>2021-12-11T17:26:49Z</dc:date>
    </item>
    <item>
      <title>Re: ListFeatureClasses() fails since 10.2 upgrade</title>
      <link>https://community.esri.com/t5/python-questions/listfeatureclasses-fails-since-10-2-upgrade/m-p/377834#M29796</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Warren. I had posted another thread on this, and neglected to mention so on this one. My apologies for that. You can find the answered thread at &lt;A href="https://community.esri.com/thread/85652"&gt;ListFeatureClasses() or ListDatasets() fails since 10.2 upgrade&lt;/A&gt;‌, where you'll see it was an empty mosaic dataset that was found to be the troublemaker.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Jan 2015 14:17:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/listfeatureclasses-fails-since-10-2-upgrade/m-p/377834#M29796</guid>
      <dc:creator>deleted-user-zpcJw1u0IXiO</dc:creator>
      <dc:date>2015-01-14T14:17:41Z</dc:date>
    </item>
    <item>
      <title>Re: ListFeatureClasses() fails since 10.2 upgrade</title>
      <link>https://community.esri.com/t5/python-questions/listfeatureclasses-fails-since-10-2-upgrade/m-p/377835#M29797</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;Justin Kraemer wrote:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hi Warren. I had posted another thread on this, and neglected to mention so on this one. My apologies for that. You can find the answered thread at &lt;A _jive_internal="true" data-containerid="2145" data-containertype="14" data-objectid="85652" data-objecttype="1" href="https://community.esri.com/thread/85652"&gt;ListFeatureClasses() or ListDatasets() fails since 10.2 upgrade&lt;/A&gt;, where you'll see it was an empty mosaic dataset that was found to be the troublemaker.&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;And this is why cross-posting is poor form...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Jan 2015 00:51:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/listfeatureclasses-fails-since-10-2-upgrade/m-p/377835#M29797</guid>
      <dc:creator>Luke_Pinner</dc:creator>
      <dc:date>2015-01-15T00:51:18Z</dc:date>
    </item>
  </channel>
</rss>

