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:
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!