I have a raster dataset [Flow Accumulation Raster]. Which is located in gdb. I need to perform Con Tool operation with this raster dataset. The Con Tool operation runs successfully with this dataset in ArcGIS 10.1,10.2,10.3 and 10.4 but it does not work in 10.5.
To perform Con Tool these steps I followed in Python window of ArcGIS:
FlowAccumulationRaster is available in TOC.
>>> import sys
>>> import arcpy
>>> from arcpy import env
>>> from arcpy.sa import *
>>> env.workspace = "C:\StreamCreationTes.gdb"
>>> env.scratchWorkspace = "C:\StreamCreationTes.gdb"
>>> spFactoryCode = int(32628)
>>> arcpy.CheckOutExtension("Spatial")
u'CheckedOut'
>>> spRef = arcpy.SpatialReference()
>>> spRef.factoryCode = spFactoryCode
>>> spRef.create()
>>> arcpy.env.outputCoordinateSystem = spRef
>>> outConditional = Con("FlowAccumulationRaster","FlowAccumulationRaster,
"", "VALUE > 10000")
I got this error message.
error Message: Runtime error Traceback (most recent call last):
File "", line 1, in File "c:\program files (x86)\arcgis\desktop10.5\arcpy\arcpy\sa\Functions.py", line 263, in Con where_clause) File "c:\program files (x86)\arcgis\desktop10.5\arcpy\arcpy\sa\Utils.py", line 53, in swapper result = wrapper(*args, *kwargs) File "c:\program files (x86)\arcgis\desktop10.5\arcpy\arcpy\sa\Functions.py", line 257, in Wrapper where_clause) File "c:\program files (x86)\arcgis\desktop10.5\arcpy\arcpy\geoprocessing_base.py", line 510, in return lambda args: val(*gp_fixargs(args, True)) ExecuteError: ERROR 001143: Background server threw an exception.
This is the Geoprocessing Options settings of my ArcGIS.
Can anyone help in this regard?