-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Open
Labels
Description
Describe the bug
We recently upgraded from ArcGIS Pro 3.3.6 to ArcGIS Pro 3.5.5 at our agency and one of our scripts that uses the arcgis-python-api started throwing an error on a process that stops a hosted vector tile layer service, edits the service defintion and then starts the service back up.
To Reproduce
Steps to reproduce the behavior:
from arcgis.layers import VectorTileLayer
item_id = '618b53910b6a48fbb4fac0cb5b7a4c69'
gis = GIS(url=PORTALURL, username=username, password=password)
vector_layer_item = gis.content.get(item_id)
vector_tile_layer = VectorTileLayer.fromitem(vector_layer_item)
vtl_manager = vector_tile_layer.manager
vtl_manager.stop()error:
----> 1 vtl_manager.stop()
File C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\Lib\site-packages\arcgis\layers\_vtl\_vector_tile_layers.py:117, in EnterpriseVectorTileLayerManager.stop(self)
110 """
111 This operation stops all instances of a service. Once a service is
112 stopped, it cannot process any incoming requests. Performing this
113 operation will stop the respective servers, terminating all pods
114 that run this service.
115 """
116 vtl_service = _layers.Service(self.url, self._gis)
--> 117 return vtl_service.stop()
AttributeError: 'Layer' object has no attribute 'stop'Screenshots
Expected behavior
In the previous version we were using the from arcgis.mapping import EnterpriseVectorTileLayerManager, VectorTileLayer but the code works without issue to stop, start, and edit the vector tile layer using the EnterpriseVectorTileLayerManager class.
Platform (please complete the following information):
- OS: Windows 11
- Python API Version
2.4.1.3
Reactions are currently unavailable