<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Append Data in Nootbooks gives me &amp;quot;Object reference not set to an instance of an object&amp;quot; Error in ArcGIS API for Python Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-python-questions/append-data-in-nootbooks-gives-me-quot-object/m-p/1040358#M5802</link>
    <description>&lt;P&gt;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 &lt;U&gt;no data&lt;/U&gt; 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!&lt;/P&gt;&lt;PRE&gt;exportCounty= counties.export(counties.title, "File Geodatabase")&lt;BR /&gt;exportCounty.download("/arcgis/home/")&lt;BR /&gt;exportCounty.id&lt;BR /&gt;&lt;BR /&gt;countyLog=gis.content.search('title:County_Log', item_type='Feature Layer')[0]&lt;BR /&gt;countyLog&lt;BR /&gt;&lt;BR /&gt;countyLog.layers[0].append(item_id=exportCounty.id,&lt;BR /&gt;upload_format='filegdb')&lt;/PRE&gt;&lt;P&gt;Output:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="AdamFackler1_0-1616616711702.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/9312i2CCF8E7D5D58E01D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="AdamFackler1_0-1616616711702.png" alt="AdamFackler1_0-1616616711702.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 24 Mar 2021 20:17:53 GMT</pubDate>
    <dc:creator>AFackler_NAPSG</dc:creator>
    <dc:date>2021-03-24T20:17:53Z</dc:date>
    <item>
      <title>Append Data in Nootbooks gives me "Object reference not set to an instance of an object" Error</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/append-data-in-nootbooks-gives-me-quot-object/m-p/1040358#M5802</link>
      <description>&lt;P&gt;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 &lt;U&gt;no data&lt;/U&gt; 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!&lt;/P&gt;&lt;PRE&gt;exportCounty= counties.export(counties.title, "File Geodatabase")&lt;BR /&gt;exportCounty.download("/arcgis/home/")&lt;BR /&gt;exportCounty.id&lt;BR /&gt;&lt;BR /&gt;countyLog=gis.content.search('title:County_Log', item_type='Feature Layer')[0]&lt;BR /&gt;countyLog&lt;BR /&gt;&lt;BR /&gt;countyLog.layers[0].append(item_id=exportCounty.id,&lt;BR /&gt;upload_format='filegdb')&lt;/PRE&gt;&lt;P&gt;Output:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="AdamFackler1_0-1616616711702.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/9312i2CCF8E7D5D58E01D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="AdamFackler1_0-1616616711702.png" alt="AdamFackler1_0-1616616711702.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 24 Mar 2021 20:17:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/append-data-in-nootbooks-gives-me-quot-object/m-p/1040358#M5802</guid>
      <dc:creator>AFackler_NAPSG</dc:creator>
      <dc:date>2021-03-24T20:17:53Z</dc:date>
    </item>
    <item>
      <title>Re: Append Data in Nootbooks gives me "Object reference not set to an instance of an object" Error</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/append-data-in-nootbooks-gives-me-quot-object/m-p/1040419#M5803</link>
      <description>&lt;PRE&gt;countyLog=gis.content.search('title:County_Log', item_type='Feature Layer')[0]&lt;/PRE&gt;&lt;PRE&gt;&lt;BR /&gt;countyLog.layers[0].append(item_id=exportCounty.id,upload_format='filegdb')&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;is countyLog the layer?&amp;nbsp; You seem to try to see what it is in the line below&lt;/P&gt;&lt;P&gt;did you try&lt;/P&gt;&lt;P&gt;countyLog.append(item_id=exportCounty.id,upload_format='filegdb')&lt;/P&gt;</description>
      <pubDate>Wed, 24 Mar 2021 21:36:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/append-data-in-nootbooks-gives-me-quot-object/m-p/1040419#M5803</guid>
      <dc:creator>DanPatterson</dc:creator>
      <dc:date>2021-03-24T21:36:35Z</dc:date>
    </item>
    <item>
      <title>Re: Append Data in Nootbooks gives me "Object reference not set to an instance of an object" Error</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/append-data-in-nootbooks-gives-me-quot-object/m-p/1040427#M5804</link>
      <description>&lt;P&gt;CountyLog is the existing layer I am appending data into. I tried taking out the .layer but got an error "'Item' object has no attribute 'append'". This is in ArcGIS Online Notebooks in case that matters.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="AdamFackler1_0-1616622378307.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/9327i9FBBE977E0447E13/image-size/medium?v=v2&amp;amp;px=400" role="button" title="AdamFackler1_0-1616622378307.png" alt="AdamFackler1_0-1616622378307.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 24 Mar 2021 21:46:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/append-data-in-nootbooks-gives-me-quot-object/m-p/1040427#M5804</guid>
      <dc:creator>AFackler_NAPSG</dc:creator>
      <dc:date>2021-03-24T21:46:45Z</dc:date>
    </item>
    <item>
      <title>Re: Append Data in Nootbooks gives me "Object reference not set to an instance of an object" Error</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/append-data-in-nootbooks-gives-me-quot-object/m-p/1040463#M5806</link>
      <description>&lt;P&gt;It seems CountyLog is an AGOL item rather than a FeatureLayer.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Try CountyLog.layers[0].append(...)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 24 Mar 2021 23:46:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/append-data-in-nootbooks-gives-me-quot-object/m-p/1040463#M5806</guid>
      <dc:creator>simoxu</dc:creator>
      <dc:date>2021-03-24T23:46:09Z</dc:date>
    </item>
    <item>
      <title>Re: Append Data in Nootbooks gives me "Object reference not set to an instance of an object" Error</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/append-data-in-nootbooks-gives-me-quot-object/m-p/1040701#M5816</link>
      <description>&lt;P&gt;That's what I had originally and what is giving me the "&lt;SPAN&gt;Object reference not set to an instance of an object" Error.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 25 Mar 2021 17:50:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/append-data-in-nootbooks-gives-me-quot-object/m-p/1040701#M5816</guid>
      <dc:creator>AFackler_NAPSG</dc:creator>
      <dc:date>2021-03-25T17:50:01Z</dc:date>
    </item>
    <item>
      <title>Re: Append Data in Nootbooks gives me "Object reference not set to an instance of an object" Error</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/append-data-in-nootbooks-gives-me-quot-object/m-p/1048151#M5932</link>
      <description>&lt;P&gt;Okay for those who stumble across this and want an answer, I figured it out (with Esri help). There is a parameter in the append function called "Upsert". It is optional and defaults to "False"; this is what threw me off. If you do not include this, any feature that has the same geometry will fail to append. HOWEVER, if you add in "upsert=False" into the append, then it will stack the data if the target and source is the same fields (like I was trying to do). You will have to do some field matching coding if they are not the same. Upsert = True means you are overwriting/ updating existing data and you'll have to put in some other parameters.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="AdamFackler1_0-1618586151698.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/11106iA2387D84CDC1C96B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="AdamFackler1_0-1618586151698.png" alt="AdamFackler1_0-1618586151698.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 16 Apr 2021 15:17:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/append-data-in-nootbooks-gives-me-quot-object/m-p/1048151#M5932</guid>
      <dc:creator>AFackler_NAPSG</dc:creator>
      <dc:date>2021-04-16T15:17:45Z</dc:date>
    </item>
  </channel>
</rss>

