I´m always getting an Error with my Python-Code. Even though it is almost the same as on the ArcGIS Help Website.

The Error occurs in line 19:

Traceback (most recent call last):

File "C:_geodata\check.py", line 19, in


File "c:\program files (x86)\arcgis\desktop10.1\arcpy\arcpy\ddd.py", line 998, in RasterDomain

raise e RuntimeError: Object: Error in executing tool

Failed to execute (IterateRasterDomain).

My Code looks like this:

import arcpy
from arcpy import env


env.workspace = arcpy.GetParameterAsText(0)
rasterList = arcpy.ListRasters()

if rasterList:
    for raster in rasterList:
        geometry = "POLYGON"
        out_file = "domain_" + raster[:-4] + ".shp"
    print "Finished"
    print "No Data available"
  • Did you check the return value of arcpy.CheckOutExtension("3D") to make sure it is Available?. – mhoran_psprep Jul 20 '12 at 14:15

Perhaps "rasterList" should be "raster" in:


From the documentation it looks like RasterDomain_3d takes only a raster rather than a list.

  • Thank you Cyrus. That really was the problem. Seems like I overlooked it – Simmal Jul 24 '12 at 8:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.