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
{{ message }}
This repository has been archived by the owner on Mar 31, 2020. It is now read-only.
What does arcrest.manageorg.PublishCSVParameters(name="csvTest", locationType="none", layerInfo=layerInfo) return for you?
also, Try url= http:// services.arcgis.com/<organization string>/arcgis/admin/
Or try using the string in the rest url, http:// services.arcgis.com/<organization string>/arcgis/admin/services, as your portalid
I think that my error is related to issue #53. When accessing my added item, I receive;
Item does not have a file.
Error: 500
Which leads me to think publishParameters = arcrest.manageorg.PublishCSVParameters(name="csvTest", locationType="none", layerInfo=layerInfo) is referencing an empty file.
I am consistently receiving this error when trying to publish a CSV as a hosted service.
{u'error': {u'message': u'Unable to publish item.', u'code': 400, u'details': [u"'publishParameters' must be specified."]}}
The script that I am passing is below;
import arcrest
if name == "main":
username = ""
password = ""
portalId = ""
url = "http://www.arcgis.com/sharing/rest" #should this be my organization or /sharing/rest??
itemId = ""
securityHandler = arcrest.AGOLTokenSecurityHandler(username,
password)
admin = arcrest.manageorg.Administration(url, securityHandler)
layerInfo = {
"name": "CSV File",
"type": "CSV",
"fields": [
{
"name": "X_COR",
"type": "esriFieldTypeDouble",
"sqlType": "sqlTypeInteger",
"nullable": "false",
"editable": "false",
"domain": "null"
},
{
"name": "Y_COR",
"type": "esriFieldTypeDouble",
"nullable": "false",
"editable": "false",
"domain": "null"
}
],
"types": [],
"templates": [],
"capabilities": "Query,"
}
publishParameters = arcrest.manageorg.PublishCSVParameters(name="csvTest", locationType="none", layerInfo=layerInfo)
usercontent = admin.content.usercontent(username=username)
statusinfo = usercontent.publishItem(fileType="csv", itemId=itemId, publishParameters=publishParameters)
print statusinfo
The text was updated successfully, but these errors were encountered: