Hello,
I have troubles using arcpy.ListDatasets in case of personal geodatabases. I have created a personal geodatabase in ArcMap (10.4.1) inclunding a feature class. Now I want to find the geodatabase and its feature class(es) with arcpy.ListDatasets (respectively ListFeatureClasses based on the output of arcpy.ListDatasets).
<SPAN class="comment token">#path where personal geodatabase test_pgb.mdb is stored</SPAN>
test_path <SPAN class="operator token">=</SPAN> r<SPAN class="string token">"H:\16\UTM\9999_dummy_data\test_pgb"</SPAN>
<SPAN class="operator token">>></SPAN><SPAN class="operator token">></SPAN> arcpy<SPAN class="punctuation token">.</SPAN>env<SPAN class="punctuation token">.</SPAN>workspace <SPAN class="operator token">=</SPAN> test_path
<SPAN class="operator token">>></SPAN><SPAN class="operator token">></SPAN> arcpy<SPAN class="punctuation token">.</SPAN>ListDatasets<SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN>
<SPAN class="punctuation token">[</SPAN><SPAN class="punctuation token">]</SPAN>
<SPAN class="operator token">>></SPAN><SPAN class="operator token">></SPAN> arcpy<SPAN class="punctuation token">.</SPAN>ListDatasets<SPAN class="punctuation token">(</SPAN><SPAN class="string token">'*'</SPAN><SPAN class="punctuation token">,</SPAN><SPAN class="string token">'Feature'</SPAN><SPAN class="punctuation token">)</SPAN>
<SPAN class="punctuation token">[</SPAN><SPAN class="punctuation token">]</SPAN><SPAN class="line-numbers-rows"><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN></SPAN>
What am I doing wrong?
The feature class contains no feautres yet (what in my opinion should be irrelevant).
Thanks a lot for your help,
Carolin