Hello,
I am trying to automate the process of creating new web maps with raster tile layers. We have published the raster tile layers from tile packages (tpkx) using the arcpy.management.SharePackage function. When we try to add the tile layers to a web map using the ArcGIS API for Python with the add_layer function we are getting an error "'PropertyMap' instance has no attribute 'capabilities'". The more detail error message is attached.
from arcgis.gis import GIS
gis = GIS("home")
items = gis.content.get('76cfae75c0534616a26dc28407d5b9b9')
layer = items.layers[0]
map_item = gis.map()
map_item.add_layer(layer)