add_layer 'NoneType' object is not iterable

1478
10
Jump to solution
01-03-2021 06:42 PM
glewi3
by
New Contributor II

im trying to do tutorial at here:

https://developers.arcgis.com/python/sample-notebooks/land-cover-classification-using-unet/

when i get up to this line i get the error

m.add_layer(world_imagery_layer)
TypeError: 'NoneType' object is not iterable

however the other item can be added to my map (m) just fine

m.add_layer(label_layer)

 

 

ive tried:

https://community.esri.com/t5/arcgis-api-for-python-questions/nonetype-quot-error-when-adding-layer-...

but apparently                  .Layer()                 isn't an attribute

AttributeError: 'GIS' object has no attribute 'Layer'

 

 

im not sure why one layer can be added but the other can't?

 

0 Kudos
10 Replies
MehdiPira1
Esri Contributor

@glewi3 ,

Unfortunately, you can't create / add data stores for an Image Server with ArcGIS Pro.

You can only edit and manage the registered ones though.