Using ArcGIS Pro 2.1.1, I spent an hour banging my head on a file geodatabase that a client sent me. It opens and reads fine in ArcCatalog and ArcMap but couldn't read or open any feature classes in ArcGIS Pro. It turns out the issue was with the folder extension using uppercase letters .GDB. I soon as I changed them to lowercase, all was good.
Steps to reproduce:
os.mkdir(r"c:\temp") # ---- C:\Temp ... exists
Traceback (most recent call last):
File "<ipython-input-17-23fc1933d7a0>", line 1, in <module>
os.mkdir(r"c:\temp")
FileExistsError: [WinError 183] Cannot create a file when that file already exists: 'c:\\temp'
cool!
but are you making a case for ignoring case?
I always found it sad that case was ignored by windows.
Some languages, case is important (ie python) but even the 'os' module ignores it
I'm making a case for consistency and adequate documentation.
Mostly I'm just documenting the issue in case someone else searches for why their file geodatabase isn't working in ArcGIS Pro.
It may be the case that this is indeed specific to geodatabase 'folders' and not folders in general.
But strangely... it doesn't matter to PRO's arcpy so it sounds like it is a Catalog issue then
import arcpy
pth = r"c:\Data\Pro_base.gdb"
arcpy.env.workspace = pth
arcpy.ListFeatureClasses()
Out[21]: ['Carp_5x5km', 'Carp_5x5km_label', 'xy', 'mesh_sample', 'connecttoline', 'xy1000', 'small', 'xy1000_closest1', 'Line', 'Points', 'PointsOnLine', 'Curve', 'PointsOnCurve', 'connecttocurve']
pth2 = r"c:\Data\Pro_base.GDB"
arcpy.env.workspace = pth2
arcpy.ListFeatureClasses()
Out[24]: ['Carp_5x5km', 'Carp_5x5km_label', 'xy', 'mesh_sample', 'connecttoline', 'xy1000', 'small', 'xy1000_closest1', 'Line', 'Points', 'PointsOnLine', 'Curve', 'PointsOnCurve', 'connecttocurve']
pth == pth2
Out[25]: False
os.path.exists(pth)
Out[26]: True
os.path.exists(pth2)
Out[27]: True
Fred... I can definitely confirm this BTW
You can add the GDB but you definitely can see anything inside it in Catalog
Also, you can't rename it, except by removing it from the aprx, renaming in windows, then reloading.
The workaround is to use arcpy which seems a bit odd
KKramer-esristaff One for the next Beta
Thank you for reporting this. I've logged [BUG-000111874: ArcGIS Pro can’t read file geodatabase if extension is uppercase .GDB]
What about camelCase?
oh you mean letters... anything but all lowercase is a failure:
The team has tested all those combinations on the 2.2 daily builds and everything is working. Should be all set in ArcGIS Pro 2.2.
Awesome, thanks for the update!