Spatially constrained multivariate clustering in ArcPy gives AttributeError?

by Elisa m   Last Updated April 15, 2019 10:22 AM

i want to use the Spatially constrained multivariate clustering tool for a point shapefile. I'm using PyScripter. The shapefile is named "LITO2016_area_modelli_20190312_v2" and the attribute fields i want to use in the analysis are "Rvmedian", "Rv_int_ran" and "zero". Prova is the output field. Arcpy give me this error:

AttributeError: 'module' object has no attribute 'SpatiallyConstrainedMultivariateClustering_stats'

I don't know where i'm wrong.

import arcpy
    from arcpy import env
    from import *
    #Check out the ArcGIS Spatial Analyst extension license
    arcpy.env.workspace = r'C:\python'
    arcpy.SpatiallyConstrainedMultivariateClustering_stats("LITO2016_area_modelli_20190312_v2", "prova", None, "Rvmedian", "Rv_int_ran", "zero", None, None, None,"CONTIGUITY_EDGES_CORNERS")

Can anybody help me?

Answers 1

Seems like the correct name of the function is


In general, when you get an error: " 'module' object has no attribute X", it means that there is no function named X in the library/module/class, which means you probably have written something wrong in the name of the function, which should be quick to find in the corresponding module's documentation.

April 15, 2019 09:39 AM

Related Questions

Updated September 25, 2017 07:22 AM

Updated April 24, 2017 22:22 PM

Updated March 11, 2019 10:22 AM

Updated June 28, 2018 17:22 PM

Updated April 05, 2019 05:22 AM