<?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: Cannot run MakeFeatureLayer for geodatabase featureclass in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/cannot-run-makefeaturelayer-for-geodatabase/m-p/1672480#M74993</link>
    <description>&lt;P&gt;don't you want the workspace set to the gdb? not the folder that it is in?&lt;/P&gt;&lt;LI-CODE lang="python"&gt; arcpy.env.workspace = "C:/data/base.gdb"&lt;/LI-CODE&gt;&lt;P&gt;not the c:/data folder as an example&lt;/P&gt;</description>
    <pubDate>Thu, 11 Dec 2025 21:04:08 GMT</pubDate>
    <dc:creator>DanPatterson</dc:creator>
    <dc:date>2025-12-11T21:04:08Z</dc:date>
    <item>
      <title>Cannot run MakeFeatureLayer for geodatabase featureclass</title>
      <link>https://community.esri.com/t5/python-questions/cannot-run-makefeaturelayer-for-geodatabase/m-p/1672472#M74991</link>
      <description>&lt;P&gt;Hi, I can't figure out why this won't run.&amp;nbsp; Any of the methods below return ERROR 000732.&amp;nbsp; I just created the geodatabase, and it's the latest version.&amp;nbsp; ListFeatureClasses() will show the layer, but then&amp;nbsp;arcpy.management.MakeFeatureLayer() fails.&lt;/P&gt;&lt;P&gt;There are some other geodatabases on my computer that will work, but I don't know why this one won't.&amp;nbsp; &amp;nbsp;I can export the feature class to a shapefile and then arcpy.management.MakeFeatureLayer will work on that.&lt;/P&gt;&lt;P&gt;#this is a geodatabase feature class. I can view it in ArcGIS, and within Arc I can run MakeFeatureLayer.&lt;BR /&gt;input_hydro = "F:\\scratch4\\test.gdb\\hydroTest"&lt;/P&gt;&lt;P&gt;arcpy.env.workspace = os.path.dirname(input_hydro)&lt;BR /&gt;ds = arcpy.ListFeatureClasses()&lt;BR /&gt;for d in ds:&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;print(d) #prints HydroTest&lt;BR /&gt;&lt;BR /&gt;input_hydro_FL = arcpy.management.MakeFeatureLayer(in_features=input_hydro, out_layer="hydroOriginal")&lt;BR /&gt;input_hydro_FL = arcpy.management.MakeFeatureLayer(in_features=d, out_layer="hydroOriginal")&lt;BR /&gt;input_hydro_FL = arcpy.management.MakeFeatureLayer(in_features=os.path.basename(input_hydro, out_layer="hydroOriginal")&lt;BR /&gt;input_hydro_FL = arcpy.management.MakeFeatureLayer(in_features=input_hydro, out_layer="hydroOriginal")&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;arcgisscripting.ExecuteError: Failed to execute. Parameters are not valid.&lt;BR /&gt;ERROR 000732: Input Features: Dataset hydroTest does not exist or is not supported&lt;BR /&gt;Failed to execute (MakeFeatureLayer).&lt;/P&gt;</description>
      <pubDate>Thu, 11 Dec 2025 20:50:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/cannot-run-makefeaturelayer-for-geodatabase/m-p/1672472#M74991</guid>
      <dc:creator>Kevin_Andras</dc:creator>
      <dc:date>2025-12-11T20:50:54Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot run MakeFeatureLayer for geodatabase featureclass</title>
      <link>https://community.esri.com/t5/python-questions/cannot-run-makefeaturelayer-for-geodatabase/m-p/1672480#M74993</link>
      <description>&lt;P&gt;don't you want the workspace set to the gdb? not the folder that it is in?&lt;/P&gt;&lt;LI-CODE lang="python"&gt; arcpy.env.workspace = "C:/data/base.gdb"&lt;/LI-CODE&gt;&lt;P&gt;not the c:/data folder as an example&lt;/P&gt;</description>
      <pubDate>Thu, 11 Dec 2025 21:04:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/cannot-run-makefeaturelayer-for-geodatabase/m-p/1672480#M74993</guid>
      <dc:creator>DanPatterson</dc:creator>
      <dc:date>2025-12-11T21:04:08Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot run MakeFeatureLayer for geodatabase featureclass</title>
      <link>https://community.esri.com/t5/python-questions/cannot-run-makefeaturelayer-for-geodatabase/m-p/1672692#M74996</link>
      <description>&lt;P&gt;&lt;SPAN&gt;os.path.dirname(input_hydro) returns the path to the GDB.&amp;nbsp; &amp;nbsp; When I set that as the workspace, it fails. When I give the full path to the in_features, it also fails. It works fine with some other geodatabases, and also works fine with shapefiles.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 12 Dec 2025 17:11:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/cannot-run-makefeaturelayer-for-geodatabase/m-p/1672692#M74996</guid>
      <dc:creator>Kevin_Andras</dc:creator>
      <dc:date>2025-12-12T17:11:28Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot run MakeFeatureLayer for geodatabase featureclass</title>
      <link>https://community.esri.com/t5/python-questions/cannot-run-makefeaturelayer-for-geodatabase/m-p/1673173#M74997</link>
      <description>&lt;P&gt;I would double check to make sure that feature class exists and there is no extra characters in the name.&lt;/P&gt;&lt;P&gt;Do a simple print out of all the features in the database,&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;import arcpy

# Set workspace to the geodatabase
gdb_path = r"F:\scratch4\test.gdb"
arcpy.env.workspace = gdb_path

# List all feature classes
feature_classes = arcpy.ListFeatureClasses()

print(f"Geodatabase: {gdb_path}")
print(f"Feature class count: {len(feature_classes)}")
print("=" * 70)

if feature_classes:
    print(f"{'No.':&amp;lt;4} {'Name':&amp;lt;30} {'Alias Name':&amp;lt;30}")
    print("-" * 70)
    
    for i, fc in enumerate(feature_classes, 1):
        try:
            # Get the full path to describe
            fc_path = f"{gdb_path}\\{fc}" if not "\\" in fc else fc
            desc = arcpy.Describe(fc_path)
            alias_name = desc.aliasName if hasattr(desc, 'aliasName') else "(no alias)"
            print(f"{i:&amp;lt;4} {fc:&amp;lt;30} {alias_name:&amp;lt;30}")
        except Exception as e:
            print(f"{i:&amp;lt;4} {fc:&amp;lt;30} ERROR: {str(e)[:30]}")
else:
    print("No feature classes found.")&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 15 Dec 2025 22:52:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/cannot-run-makefeaturelayer-for-geodatabase/m-p/1673173#M74997</guid>
      <dc:creator>TonyAlmeida</dc:creator>
      <dc:date>2025-12-15T22:52:35Z</dc:date>
    </item>
  </channel>
</rss>

