Append not working

1537
1
Jump to solution
03-30-2012 08:08 AM
Zeke
by
Regular Contributor III
Any ideas why Append is throwing the error below? There are three parcels selected, that I'm trying to append to the Cases feature class. As far as I can tell, there's absolutely nothing that's using Cases. No one else has access to this geodb, so it's not a case of another user, and I'm not doing anything else with it. Using Append from the toolbox works fine. Thanks.

Code:
import arcpy from arcpy import env  env.workspace = r"\\TestServer\TestCases_Geodatabase.gdb"  #------------------------------------------------------------------------------- # Append selected parcels to Cases #  def AppendParcelsToCases():     input = "Parcel"     target = "Cases"     schemaType = "NO_TEST"      try:         arcpy.Append_management(input, target, schemaType)     except Exception as e:         arcpy.AddError("Error creating case feature! \n" + e.message)


Error:
Executing: CreateCase Start Time: Fri Mar 30 11:01:12 2012 Running script CreateCase... Error creating case feature!  ERROR 999999: Error executing function. Cannot acquire a lock. Cannot acquire a lock. [The table Cases is being written by another process.] Cannot acquire a lock. [The table Cases is being written by another process.] Failed to execute (Append).  Completed script CreateCase... Failed to execute (CreateCase). Failed at Fri Mar 30 11:01:16 2012 (Elapsed Time: 4.00 seconds) 
Tags (2)
0 Kudos
1 Solution

Accepted Solutions
Zeke
by
Regular Contributor III
Never mind, figured it out.
If anyone else runs into this, the problem was that Cases data source pointed to a mapped drive path to the data "P:\TestCases_Geodatabase.gdb", while the workspace and some other feature classes used the UNC path "\\TestServer\TestCases_Geodatabase.gdb". It's the same location, but apparently ArcGIS is picky about it.

View solution in original post

1 Reply
Zeke
by
Regular Contributor III
Never mind, figured it out.
If anyone else runs into this, the problem was that Cases data source pointed to a mapped drive path to the data "P:\TestCases_Geodatabase.gdb", while the workspace and some other feature classes used the UNC path "\\TestServer\TestCases_Geodatabase.gdb". It's the same location, but apparently ArcGIS is picky about it.