AnsweredAssumed Answered

Feature Collection JSON doesn't have 'layers'

Question asked by on Oct 3, 2018
Latest reply on Oct 4, 2018 by bixb0012



I've a problem to import data from a pandas data frame on ArcGIS OnLine.

I followed the documentation scrupulously on Accessing and creating content | ArcGIS for Developers  paragraph "importing data from a pandas data frame".

But when I do:

myEvents = pd.read_excel(myXlsx)

myEvents_fc = myGis.content.import_data(myEvents)
myEvents_fc_dict = dict(
myEvents_json = json.dumps(myEvents_fc_dict)
myEvents_item_properties = {'title': 'zzmcada_events_df',
                                                'description': 'test to import pabdas dataframe',
                                                'tags': 'zzmcada test, arcgis python api, pandas, xlsx',
                                                'type':'Feature Collection'}

myEvents_item = myGis.content.add(myEvents_item_properties)

I receive a 

RuntimeError: Error while analyzing Feature Collection, Feature Collection JSON doesn't have 'layers'
(Error Code: 406)

Columns data type are

eventID              object
eventName        object
eventPriority      int64
eventPlanned    bool
eventType          object
eventAddress    object
Latitude             float64
Longitude          float64
dtype: object

Can someone help me to understand what is wrong?


Many thanks