Select to view content in your preferred language

Creating Hosted Feature Layer with ArcGIS API for Python

60
0
Tuesday
Labels (1)
ZacharyMeadows
New Contributor

I am currently having trouble uploading a hosted feature layer from the ArcGIS API for Python. I followed the code samples from Publishing SDs, Shapefiles and CSVs | ArcGIS API for Python

My Code is as follows:

shapefile = self._gis.content.add({}, os.path.join(ENV, self.path))
analysis = self._gis.content.analyze(item=shapefile, file_type="shapefile")
analysis["publishParameters"]["layerInfo"]["capabilities"] = "Query"
layer = shapefile.publish(publish_parameters=analysis["publishParameters"])
 
It is throwing the following error:
 
Annotation 2024-07-09 093945.png

 

I have already verified that I am authenticated with my Enterprise Portal and that I have the correct privileges in order to publish the hosted feature layer.

 

Any help is appreciated, Thanks!

0 Kudos
0 Replies