Bug in FeatureLayerCollection.query_domains
See original GitHub issueIn arcgis python api version 1.6.2, the FeatureLayerCollection.query_domains
method generates an error. For example:
item = gis.content.get('ITEM_ID')
flc = FeatureLayerCollection.fromitem(item)
flc.query_domains([0])
produces this error:
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-30-31345fbf23ab> in <module>
----> 1 flc.query_domains([0])
~/anaconda3/envs/geo/lib/python3.7/site-packages/arcgis/features/layer.py in query_domains(self, layers)
1908
1909 """
-> 1910 if not isinstance(layers (tuple, list)):
1911 raise ValueError("The layer variable must be a list.")
1912 url = "{base}/queryDomains".format(base=self._url)
TypeError: 'list' object is not callable
The error appears to be caused by a missing comma after layers
in line 1910 of layer.py
.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:6 (2 by maintainers)
Top Results From Across the Web
What's new in version 2.0.0 | ArcGIS API for Python
FeatureLayerCollection. Fixes BUG-000134934 where query_domains() fails with The requested layer (layerId: queryDomains) was not found. (Error Code: 400).
Read more >featureLayerCollection overwrite "Job failed" - Esri Community
Hi. I am trying to update/overwrite a hosted feature layer, following the logic given near the end of a tutorial on learn.arcgis (...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
As a workaround you can access domains this way:
Thank you @mikiekelly
I re-purposed your function to create a list of coded domain values