My post here is a continuation of my other currently unresolved post pertaining to errors while trying to publish a csv to portal with the ArcGIS Python API-- version 1.8.4. I couldn't publish to ArcGIS Enterprise Portal with this, it throws a KeyError:
from IPython.display import display
from arcgis.gis import GIS
import os
gis = GIS('Home')
csv_file = r'C:\Users\jpilbeam\Downloads\c19_Vaccine_Current.csv'
csv_item = gis.content.add({}, csv_file)#add csv to Portal
csv_layer = csv_item.publish()#<--throws error
KeyError: 'type'
So now I went this route:
csv_file = r'C:\Users\jpilbeam\Downloads\c19_Vaccine_Current.csv'
csv_properties={'title':'csvtoportaltest', 'description':'test', 'tags':'python, test'}
test_csv_item = gis.content.add(item_properties=csv_properties, data=csv_file)
csv_feature_layer_item = test_csv_item.publish() #<-- threw error here
Exception: Job failed
It actually published this time, but on the data page of it it says "There was an error". And the weird thing was, just after I did this the server was down with some 500 error?
