TransWikia.com

AttributeError: Object: Tool or environment not found

Geographic Information Systems Asked by Grace on January 29, 2021

I am new to coding and do not know what I am getting the error message: AttributeError: Object: Tool or environment not found. My first line of code is the typical "import arcpy….." I have already tried changing my CheckOutExtension from "Spatial" to "ImageAnalyst" and got the same error message. Any suggestions?

inSegRaster = "D:4.PeruPeru_FallPeru_Fall.gdb_2018_updatedClip"
train_features = "D:4.PeruPeru_FallPeru_Fall.gdbjust_trees"
out_definition = "D:4.PeruPeru_FallSupportVector2018.ecd"
maxNumSamples = "1000"
attributes = "COLOR;MEAN"

# Check out the ArcGIS Image Analyst extension license
arcpy.CheckOutExtension("ImageAnalyst")

#Execute
arcpy.gp.TrainSupportVectorMachineClassifier(
    inSegRaster, train_features, out_definition, 
    in_additional_raster, maxNumSamples, attributes)

The error message I get when running the above code is:

AttributeError: Object: Tool or environment
not found

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP