kuiperfoliage

GPKs and arcpy.CalculateField_management

Discussion created by kuiperfoliage on Jul 28, 2012
Latest reply on May 27, 2013 by matthewb
Hi,

i'm trying to switch over from ArcGIS Server to ArcGIS Runtime but i'm experiencing some problems with the arcpy.CalculateField_management function.

The arcpy.CalculateField_management is unreliable when executed through ArcGIS Runtime.

I keep getting the following error, randomly, on different layers:

ERROR 999999: Error executing function.
Workspace or data source is read only.
Workspace or data source is read only.
Failed to execute (CalculateField).


I'm executing arcpy.CalculateField_management in sequence, on 1 to 20 layers. Each time a different layer will fail with the same error.

I think it is related to this problem: http://forums.arcgis.com/threads/46848-Table.Insert-fails-with-quot-Workspace-or-data-source-is-read-only.(-2147220893)-quot

but i'm not sure how I can use those suggestions within my application/python script.

I'm executing the following:

codeblock = """multiplier = """ + str(multiplier)
arcpy.CalculateField_management(orgfile, "val", "multiplier * math.pow(10, (!m! / 10))", "PYTHON_9.3", codeblock)

Any ideas how to fix this issue? Or will the ArcGIS Runtime fix this issue in their next release ?

Thanks for your time

EDIT: Through ArcGIS server i'm using ArcSDE but with ArcGIS Runtime i'm using a local File geodatabase.
EDIT2: The CalculateField is executed within the tempstore/scratch gdb of the ArcGIS Runtime directory structure.

Outcomes