web_map.forms causes: AttributeError: 'PropertyMap' instance has no attribute 'layerType'

275
1
01-26-2023 05:06 AM
by Anonymous User
Not applicable

Calling 'web_map.forms' causes the following error on ArcGIS Python 2.1.0.  Python 3.9.

However, it works with another web map. Any ideas about what is wrong with my web map?

Traceback (most recent call last):
File "/usr/app/src/save_web_map_to_json.py", line 52, in <module>
pprint(web_map.forms)
File "/usr/local/lib/python3.9/site-packages/arcgis/_impl/common/_uti
ls.py", line 219, in _lazy_property
setattr(self, attr_name, fn(self))
File "/usr/local/lib/python3.9/site-packages/arcgis/mapping/_types.py
", line 1591, in forms
return _forms.FormCollection(parent=self)
File "/usr/local/lib/python3.9/site-packages/arcgis/mapping/forms.py"
, line 61, in __init__
self._refresh_forms(parent)
File "/usr/local/lib/python3.9/site-packages/arcgis/mapping/forms.py"
, line 78, in _refresh_forms
self.forms = self._get_forms_from_webmap(parent)
File "/usr/local/lib/python3.9/site-packages/arcgis/mapping/forms.py"
, line 163, in _get_forms_from_webmap
self._construct_forms_array(forms, webmap.tables, parent=webmap)
File "/usr/local/lib/python3.9/site-packages/arcgis/mapping/forms.py"
, line 133, in _construct_forms_array
FormCollection._get_forms_within_group_layer(forms, layer, parent)
File "/usr/local/lib/python3.9/site-packages/arcgis/mapping/forms.py"
, line 137, in _get_forms_within_group_layer
if layer.layerType == "GroupLayer":
File "/usr/local/lib/python3.9/site-packages/arcgis/_impl/common/_mix
ins.py", line 82, in __getattr__
raise AttributeError(
AttributeError: 'PropertyMap' instance has no attribute 'layerType'

0 Kudos
1 Reply
by Anonymous User
Not applicable

Also, using Portal environment.

0 Kudos