Not sure what's causing this error. I did notice that the 2020 wildfires layer referenced in the 10-01 tutorial has been depreciated: c3c10388e3b24cec8a954ba10458039d
It's throwing the error on the structures variable. I've been working through the jupyter cells and can't go any further because of the error. I've put the code so far here. The authors are Dave Crawford and Daniel Yaw.
import arcgis
import time
gis = arcgis.GIS('home')
# get the layer for USA structures
item_id_structures = '0ec8512ad21e4bb987d7e848d14e7e24'
item_structures = gis.content.get(item_id_structures)
lyr_structures = item_structures.layers[0]
# get the layer for 2020 wildfires
item_id_wildfires = 'c3c10388e3b24cec8a954ba10458039d'
item_wildfires = gis.content.get(item_id_wildfires)
lyr_wildfires = item_wildfires.layers[1]
fset_single_wildfire = lyr_wildfires.query("FIRE_NAME = 'AVILA'")
fset_single_wildfire
# get the feature from the FeatureSet
wildfire_feature = fset_single_wildfire.features[0]
# get the geometry from the single feature
wildfire_geom = wildfire_feature.geometry
# get the wildfire name
wildfire_name = wildfire_feature.get_value("FIRE_NAME")
print(wildfire_name)
# Create a spatial filter to find structures that intersect the wildfire
wildfire_filter = arcgis.geometry.filters.intersects(
wildfire_geom, sr = wildfire_geom['spatialReference']
)
# Query the structures layer for structures that intersect the wildfire
structures = lyr_structures.query(
geometry_filter = wildfire_filter,
return_count_only=True
)
print(structures)