Map object | MapContent object | update_layer() method not working in 2.4.3
- Dominant language
- Python
- Stars
- 2.2k
- Forks
- 1.2k
- Avg merge
- 2h 40m
- Merged PRs (30d)
- 2
Description
**Describe the bug**
In 2.4.2 the Map object, MapContent object, update_layer() worked just fine. In 2.4.3, the same workflows fail to run.
The layer is not a group layer or a layer in a group.
**To Reproduce**
Steps to reproduce the behavior:
```python
from arcgis.gis import GIS
from arcgis.map import Map
agol = GIS("home")
wm_item = agol.content.get("WM_ITEM_ID")
webmap = Map(wm_item)
options_dict = {
"title" : "National Inventory of Architectural Heritage (NIAH)"
}
## fails here
webmap.content.update_layer(
index=0,
options=options_dict
)
webmap.update()
```
error:
```python
Traceback (most recent call last):
File "C:\ArcGISAFP_03\Python_Scripts\Completed\07_Layer_Settings\rename_layer.py", line 61, in
webmap.content.update_layer(
~~~~~~~~~~~~~~~~~~~~~~~~~~~^
index=lyr_index,
^^^^^^^^^^^^^^^^
options=options_dict
^^^^^^^^^^^^^^^^^^^^
)
^
File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\Lib\site-packages\arcgis\map\map_widget.py", line 2230, in update_layer
self._helper.update_layer(
~~~~~~~~~~~~~~~~~~~~~~~~~^
index,
^^^^^^
...<5 lines>...
form,
^^^^^
)
^
File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\Lib\site-packages\arcgis\map\_utils.py", line 1972, in update_layer
if isinstance(layer, group_layer.BaseGroup):
^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'bool' object has no attribute 'BaseGroup'
```
**Screenshots**
If applicable, add screenshots to help explain your problem.
**Expected behavior**
The above is simply attempting to rename a layer. Worked perfect in 2.4.2 and fails in 2.4.3
**Platform (please complete the following information):**
- OS: Windows 11
- Browser: Chrome / Edge
- Python API Version: 2.4.3
**Additional context**
Add any other context about the problem here, attachments etc.
Contributor guide
Assessment
This issue has not been assessed yet.