Not sure if this is a Python problem or an ArcMap10.1(arcpy) issue. I have a script I run once a month and it has been running fine for months. After upgrading to ArcMap 10.1 (Prerelease), I have started getting random errors. One of the errors deals with FGDB's. # Workspace Creation
GIS_Data = config.GIS_Data
Fold = "Update" + time.strftime("%y%m%d",time.localtime(time.time()))
fold_loc = GIS_Data + "\\Update" + time.strftime("%y%m%d",time.localtime(time.time()))
# Process: Create Folder
arcpy.CreateFolder_management(GIS_Data, Fold)
# Process: Create Finished File GDB
arcpy.CreateFileGDB_management(fold_loc, "finished", "Current")
# Process: Create Parts File GDB
arcpy.CreateFileGDB_management(fold_loc, "parts", "Current")
# End: Workspace Creation
This code used to work. However, now the script creates the two FGDB's but they can not be opened or writen to. Instead I have had to change the code to
# Workspace Creation
GIS_Data = config.GIS_Data
Fold = "Update" + time.strftime("%y%m%d",time.localtime(time.time()))
fold_loc = GIS_Data + "\\Update" + time.strftime("%y%m%d",time.localtime(time.time()))
# Process: Create Folder
arcpy.CreateFolder_management(GIS_Data, Fold)
# Process: Create Finished File GDB
arcpy.CreateFileGDB_management(fold_loc, "finished", "10.0")
# Process: Create Parts File GDB
arcpy.CreateFileGDB_management(fold_loc, "parts", "10.0")
# End: Workspace Creation
Only the parts in red were changed. After that change the code worked fine.