Map object | MapContent object | update_layer() method not working in 2.4.3
@nanaeaubry is already working on this.
Since Jun 12, 2026.
Assessment
This issue has not been assessed yet.
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:
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:
Traceback (most recent call last):
File "C:\ArcGISAFP_03\Python_Scripts\Completed\07_Layer_Settings\rename_layer.py", line 61, in <module>
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.
- Dominant language
- Python
- Stars
- 2.2k
- Forks
- 1.1k
- Avg merge
- 2h 40m
- Merged PRs (30d)
- 2
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from Esri/arcgis-python-api
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Esri/arcgis-python-api#2513 · 1 comment ·
-
bug
Difficulty 1/5 Under an hour Newbie friendliness 85/100
Esri/arcgis-python-api#2453 · 3 comments ·
-
documentation enhancement
Difficulty 1/5 Under an hour Newbie friendliness 76/100
Esri/arcgis-python-api#2097 · 1 comment ·
-
bug
Difficulty 4/5 3-5 days Newbie friendliness 58/100
Esri/arcgis-python-api#2537 · 3 comments ·
-
bug
Difficulty 4/5 3-5 days Newbie friendliness 56/100
Esri/arcgis-python-api#2531 · 1 comment ·
All issues in Esri/arcgis-python-api
Similar issues
-
documentation help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
simonw/sqlite-utils#872 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100