ArcGIS Pro can't read file geodatabase if extension is uppercase .GDB

7862
9
02-22-2018 11:15 AM
FredSpataro
Occasional Contributor III

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:

  1. Open ArcCatalog create new geodatabase TEST1.gdb 
  2. Add a feature class 
  3. Close ArcCatalog
  4. Use windows explorer, make a copy of the folder to TEST2.GDB
  5. Open ArcCatalog, both TEST1.gdb and TEST2.GDB are visible and feature class can be seen
  6. Open ArcGIS Pro
  7. Create a new map template project
  8. Try to add feature class from TEST2.GDB 
    1. I can't get it display the feature class using the Add Data Button, Adding the database connection or Adding the folder connection.  
  9. Close ArcGIS Pro and ArcCatalog
  10. Open windows explorer
  11. Rename TEST2.GDB to TEST2.gdb
  12. Reopen ArcGIS Pro and the test project. 
  13. Try to add the feature class from TEST2.gdb, works fine in all three places. 

Tags (2)
9 Replies
DanPatterson_Retired
MVP Emeritus
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

0 Kudos
FredSpataro
Occasional Contributor III

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. 

DanPatterson_Retired
MVP Emeritus

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
0 Kudos
DanPatterson_Retired
MVP Emeritus

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

0 Kudos
KoryKramer
Esri Community Moderator

Thank you for reporting this.  I've logged [BUG-000111874: ArcGIS Pro can’t read file geodatabase if extension is uppercase .GDB]

0 Kudos
JoshuaBixby
MVP Esteemed Contributor

What about camelCase?

0 Kudos
FredSpataro
Occasional Contributor III

oh you mean letters... anything but all lowercase is a failure:

KoryKramer
Esri Community Moderator

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.

FredSpataro
Occasional Contributor III

Awesome, thanks for the update!

0 Kudos