I am trying to convert a shape file to raster by a python script. But it did not work. However, this conversion was done successfully by ArcToolBox. I used similar parmeters for raster conversion in the script - but I have got following errors. Any idea?
# print arcpy.GetMessages
Traceback (most recent call last):
File "K:\SCRIPT\Python_Script\ShapeToRaster.py", line 22, in <module>
arcpy.FeatureToRaster_conversion(inFeatures, field, outRaster, cellSize)
File "C:\Program Files (x86)\ArcGIS\Desktop10.0\arcpy\arcpy\conversion.py", line 1686, in FeatureToRaster
raise e
ExecuteError: Failed to execute. Parameters are not valid.
ERROR 000860: Input features: is not the type of Composite Geodataset, or does not exist.
ERROR 001000: Field: Field MUKEY does not exist
Failed to execute (FeatureToRaster).
---------------------------------------------------------------------
# Import system modules
import arcpy, os,sys
#
# Set environment settings
arcpy.env.workspace = "K:/STATE_MUKEY/AREA.gdb"
#
# Set local variables
inFeature = "soilmu_in.shp"
field = "MUKEY"
outRaster = "K:/STATE_MUKEY/RASTER.gdb/soilmu_in"
#assignmentType = "CELL_CENTER"
#priorityField = "NONE"
cellSize = 90
# Execute FeatureToRaster
arcpy.FeatureToRaster_conversion(inFeature, field, outRaster, cellSize)
print arcpy.GetMessages