Con tool: unable to assign constant value for false condition

Discussion created by malnunn on Jan 19, 2014
Latest reply on Jul 23, 2014 by gyetmanesri-ca-esridist

I'm attempting to build a tool that will use Con to highlight overlap between two input raster values by producing an output raster with 1s and 0s.
However, even in a most simple form with a single raster and condition I can't seem to assign a constant value for the false condition. The code below results in the error:
"0" does not exist

Currently using 10.2.

import arcpy
import as sa

# input raster
ras1 = r"D:\mal\Soil_Type.tif"

# value of ras1 to be evaluated as true
class1 = 3

# Define output layer
ras_output = (r"D:\mal\soils.gdb\soiltype_overlap")

ras3 = sa.Con(ras1 == class1, 1, 0)

I can't work out what I am doing wrong here, as the syntax seems to be consistent with all help examples.

Any advice appreciated