I am making a notebook that will archive data by appending data into an existing feature layer. I have the data download as a geodatabase on ArcGIS Online and then append in. It has worked for me in the past, but today it's giving me a real hard time. Odd part is, It will run if there is no data in the existing target feature layer, but if there is data in the feature layer, then I get the "Object reference not set to an instance of an object" error. Code below, any help would be great, thanks!
exportCounty= counties.export(counties.title, "File Geodatabase")
exportCounty.download("/arcgis/home/")
exportCounty.id
countyLog=gis.content.search('title:County_Log', item_type='Feature Layer')[0]
countyLog
countyLog.layers[0].append(item_id=exportCounty.id,
upload_format='filegdb')
Output:
