narsdani

Cryptic arcpy.da.Editor error

Discussion created by narsdani on Nov 30, 2012
Latest reply on Jan 22, 2014 by jg1295
I run this code (in a try/except statement and amongst much more):

    arcpy.ClearWorkspaceCache_management()
    print "1"
    SdeVersion = ProductionDatabase(VersionName)
    print "2"
    SdeFishboneFC = SdeVersion.Fishbone()
    print "3"
    SdeAddressPointFC = SdeVersion.AddressPoint()
    print "4"
    AddressPointLayer = AddressPointLayer + "_versioned"
    print "5"
    FishboneLayer = "Fishbones_versioned"
    print "6"
    arcpy.MakeFeatureLayer_management(SdeAddressPointFC, AddressPointLayer)
    print "7"
    arcpy.MakeFeatureLayer_management(SdeFishboneFC, FishboneLayer)
    print "8"
    print SdeVersion.Path()
    edit = arcpy.da.Editor(SdeVersion.Path())  # Create an edit session.
    print "9"
    edit.startEditing(False, True)    # Start the edit session
    print "10"
    edit.startOperation()       # Start an edit operation
    print "11"


And I get this output:

1
2
3
4
5
6
7
8
C:\temp\scratchfolder1\Basemap_QcAddress_Fishbone.sde
9
ERROR: FATAL ERROR: Error during post analysis processing: error return without
exception set
FATAL ERROR: Error during post analysis processing: error return without excepti
on set
Traceback (most recent call last):
  File "R:\DanN\Automation\Development\CountywideFishboneAnalysis.py", line 216,
 in <module>
    raise inst
SystemError: error return without exception set


My custom class [SdeVersion = ProductionDatabase(VersionName)] uses arcpy.CreateDatabaseConnection_management() and returns a functioning connection file (as tested manually in ArcCatalog after the script errors out).  Line 216 (cited in the error message) is the "raise" statement in my try/except block.  Am I utilizing arcpy.da.Editor incorrectly?  Is this "without exception set" thing a bug in the data access module itself?  Is 9AM too early for a beer?

Thanks in advance,
Dan

Outcomes