ArcMap 10.1/Python 2.7 problem

406
2
05-14-2012 09:04 AM
ScottBlankenbeckler
Occasional Contributor
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.
Tags (2)
0 Kudos
2 Replies
curtvprice
MVP Esteemed Contributor
The purpose of "Pre-Release" is to testing things like this and send issues to support.esri.com.

Please do that!
0 Kudos
ScottBlankenbeckler
Occasional Contributor
Hence the reason this is a discussion not a Q/A thread.

Just thought I would post it here so anyone else using 10.1 (prerelease) would know there is an issue and what is the work around (If any).
0 Kudos