You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm working with the arcgis API for Python, but I'm having some serious issues getting it to work as expected.
I'm using portal-tier authentication.
First I try loading a Web Map directly. That gives me the following error.
from arcgis.gis import GIS
portal = GIS(url="https://maps.xyz.com/portal", username="xyz", password="xyz")
web_map_id = 'xyz'
web_map = portal.content.get(web_map_id)
portal.map(web_map)
============
ValidationError: 3680 validation errors for Webmap
operationalLayers.5.AnnotationLayerArcGISAnnotationLayer.layerType
Input should be 'ArcGISAnnotationLayer' [type=literal_error, input_value='ArcGISMapServiceLayer', input_type=str]
For further information visit https://errors.pydantic.dev/2.4/v/literal_error
operationalLayers.5.CatalogLayerCatalogLayer.layerType
Input should be 'CatalogLayer' [type=literal_error, input_value='ArcGISMapServiceLayer', input_type=str]
For further information visit https://errors.pydantic.dev/2.4/v/literal_error
operationalLayers.5.CSVLayerCSV.layerType
Input should be 'CSV' [type=literal_error, input_value='ArcGISMapServiceLayer', input_type=str]
For further information visit https://errors.pydantic.dev/2.4/v/literal_error
operationalLayers.5.DimensionLayerArcGISDimensionLayer.layerType
...
Field required [type=missing, input_value={'id': 911, 'layerDefinit...efaultVisibility': True}, input_type=dict]
For further information visit https://errors.pydantic.dev/2.4/v/missing
operationalLayers.5.LinkChartLayerLinkChartLayer.layerType
Input should be 'LinkChartLayer' [type=literal_error, input_value='ArcGISMapServiceLayer', input_type=str]
For further information visit https://errors.pydantic.dev/2.4/v/literal_error
Subsequently, I tried starting with an empty map, and loading Feature Layers directly
from arcgis.layers import Service
layers = Service(
"https://xyz.com/arcgis/rest/services/xyz/xyz/FeatureServer"
)
m = portal.map()
m.basemap.basemap = 'satellite'
for lyr in layers.layers:
m.content.add(lyr)
m.center = [xyz, xyz]
m.zoom = 30
That just outputs the basemap, with no layers to be seen.
Hello!
I'm working with the arcgis API for Python, but I'm having some serious issues getting it to work as expected.
I'm using portal-tier authentication.
First I try loading a Web Map directly. That gives me the following error.
Subsequently, I tried starting with an empty map, and loading Feature Layers directly
That just outputs the basemap, with no layers to be seen.
Printing
layers
gives the followingIs this maybe a permission issue? I have no other ideas left. I've followed the guides in the documentation.
Also, this is all on version 2.4.0
Cheers.
The text was updated successfully, but these errors were encountered: