I am trying to convert a process usually used in ArcGIS Tools to arcpy in a Jupyter notebook. I have a very long Con statement that basically takes all the values of 10 rasters and adds them together. I have tested a small snippet of the code to make sure the syntax is correct, but I am running into errors saying 'TypeError: IsNull() takes 1 positional argument but 3 were given'
# Import system modules
import arcpy
import os
# Check out the ArcGIS Spatial Analyst extension license
arcpy.CheckOutExtension("Spatial")
from arcpy.sa import *
# Set overwrite option
arcpy.env.overwriteOutput = True
# Set the workspace for ListFeatureClasses
arcpy.env.workspace = r"G:\Projects\bdv_2020Q4.gdb"
print(arcpy.env.workspace)
# Set the extent environment using the Extent class.
arcpy.env.extent = arcpy.Extent(-180.0, 90.0, 180.0, -90.0)
# Set the cell size environment using a number.
arcpy.env.cellSize = 0.0083333333
#Con statement
outputRaster = Con(IsNull(arcpy.Raster("IUCN_1a"),0,"IUCN_1a")) + Con(IsNull(arcpy.Raster("IUCN_not_reported"),0,"IUCN_not_reported"))
outputRaster.save("comb_test2")