AnsweredAssumed Answered

I am trying to upload a File geodatabase, but cannot publish in Portal 10.4.1

Question asked by hbouckaertesriaustralia-com-au-esridist Employee on Aug 3, 2016
Latest reply on Aug 4, 2016 by hbouckaertesriaustralia-com-au-esridist



I am uploading a File geodatabase using the new arcgis.gis API. Because my Portal is 10.4.1, I should be able to publish the contents of the file geodatabase as feature services. I can upload and publish a shape file, but with similar code, uploading a file geodatabase works, but publishing fails.


Here is the code for the uploading the file geodatabase: 


from arcgis.gis import *

gis = GIS("http://<myportalserver>/arcgis","<username", "<password>")

data = "C:\\temp\\" # File geodatabase zipped up

item_properties = {}
item_properties ["type"] = "fileGeodatabase"  # I need the type definition, otherwise add did not work

fgdbdata = gis.content.add(item_properties, data)# this works, the item is uploaded

fgdbdata.publish() # ERROR:


I get an error that Nonetype has no attribute publish(), so obviously fgdbdata is empty or None. Yet almost the same code does work when uploading a shape file.

Does anyone have an example where a File geodatabase is uploaded as a new item and then the feature classes within published as feature services?