laptop and a wrench

Bug

When creating hosted feature layer views through the ArcGIS API for Python using the create_view() function, the REST URL spaces are encoded differently than when a view is created using the Create View Layer tool in ArcGIS Online.

ArcGIS API for Python
Bug ID Number BUG-000163050
SubmittedNovember 17, 2023
Last ModifiedJune 5, 2024
Applies toArcGIS API for Python
Version found2.1.1
Operating SystemWindows OS
Operating System Version10.0 64 Bit
StatusAs Designed

Additional Information

Layer views cannot contain spaces in the name. Underscores included in the name are kept. For example, the view can be named, 'US_Points_with_lat_long' and the view is created as expected. If the view name is, 'US Points_with_lat_long', the value contains a space in the name, which causes the issue. To automate the process, use the Python built-in replace function to replace spaces with `_`.

Workaround

Include underscores in the Python code when naming the created view layer.

Steps to Reproduce

Bug ID: BUG-000163050

Software:

  • ArcGIS API for Python

Get notified when the status of a bug changes

Download the Esri Support App

Discover more on this topic

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options