<?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 Re: Arcgis API for Python Append Method Error - RuntimeError: Object reference not set to an instance of an object. in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/arcgis-api-for-python-append-method-error/m-p/1096590#M62298</link>
    <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/387645"&gt;@GeofyAdmin&lt;/a&gt;&amp;nbsp;-- if you still have the sample code for this, that would be much appreciated!&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 08 Sep 2021 23:56:06 GMT</pubDate>
    <dc:creator>ChadPeltier</dc:creator>
    <dc:date>2021-09-08T23:56:06Z</dc:date>
    <item>
      <title>Arcgis API for Python Append Method Error - RuntimeError: Object reference not set to an instance of an object.</title>
      <link>https://community.esri.com/t5/python-questions/arcgis-api-for-python-append-method-error/m-p/110034#M8524</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello - I am trying to append one feature layer to another in ArcGIS Online using the ArcGIS API for Python. Code below. I am receiving the error:&amp;nbsp;RuntimeError: Object reference not set to an instance of an object.&lt;BR /&gt;(Error Code: 400)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="jive-emoji image-1 jive-image j-img-original" src="https://community.esri.com/legacyfs/online/486862_Capture.PNG" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Mar 2020 01:54:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcgis-api-for-python-append-method-error/m-p/110034#M8524</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2020-03-31T01:54:20Z</dc:date>
    </item>
    <item>
      <title>Re: Arcgis API for Python Append Method Error - RuntimeError: Object reference not set to an instance of an object.</title>
      <link>https://community.esri.com/t5/python-questions/arcgis-api-for-python-append-method-error/m-p/110035#M8525</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;well, your flayer is undeclared!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To clarify the proper workflow of what you are trying to do:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. First get the hosted feature service containing the layer you want to update/append, like this FS=gis.content.get('itemID here')&lt;/P&gt;&lt;P&gt;2. Get the layer like this FL=FS[0] or whatever index/name you have&lt;/P&gt;&lt;P&gt;3. Get the item id of the AGOL item containing source data (could be a shapefile or whatever you have previously uploaded. I am assuming a geojson file)&amp;nbsp;agolId&lt;SPAN&gt;=gis.content.get('itemID here')&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;4. Now attempt to append like this: ret=FL.append(item_id=&lt;SPAN&gt;agolId, upsert=false, update_geometry=true, upload_format='geojson'&lt;/SPAN&gt;)&lt;/P&gt;&lt;P&gt;5. Optionally you should check the ret variable to see if success or failire&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Finally, fields should match between source and dest. If not, you can make use of the&amp;nbsp;&lt;SPAN style="color: #404040; background-color: #fcfcfc;"&gt;field_mappings prop of the append method&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #404040; background-color: #fcfcfc;"&gt;Good luck and check append doc below&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://developers.arcgis.com/python/api-reference/arcgis.features.toc.html?highlight=append#arcgis.features.FeatureLayer.append" title="https://developers.arcgis.com/python/api-reference/arcgis.features.toc.html?highlight=append#arcgis.features.FeatureLayer.append"&gt;arcgis.features module — arcgis 1.8.0 documentation&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Apr 2020 15:22:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcgis-api-for-python-append-method-error/m-p/110035#M8525</guid>
      <dc:creator>GeofyAdmin</dc:creator>
      <dc:date>2020-04-02T15:22:35Z</dc:date>
    </item>
    <item>
      <title>Re: Arcgis API for Python Append Method Error - RuntimeError: Object reference not set to an instance of an object.</title>
      <link>https://community.esri.com/t5/python-questions/arcgis-api-for-python-append-method-error/m-p/110036#M8526</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;My apologies, the flayer is declared above the screenshot I sent. I will try the field mappings. Thank you for the quick response.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Apr 2020 15:36:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcgis-api-for-python-append-method-error/m-p/110036#M8526</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2020-04-02T15:36:44Z</dc:date>
    </item>
    <item>
      <title>Re: Arcgis API for Python Append Method Error - RuntimeError: Object reference not set to an instance of an object.</title>
      <link>https://community.esri.com/t5/python-questions/arcgis-api-for-python-append-method-error/m-p/110037#M8527</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sure but also pay attention to the item_id parameter to the append method.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;It’s expecting a certain type of portal item, I.e. an uploaded file: shapefile, geojson etc.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Apr 2020 17:37:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcgis-api-for-python-append-method-error/m-p/110037#M8527</guid>
      <dc:creator>GeofyAdmin</dc:creator>
      <dc:date>2020-04-02T17:37:57Z</dc:date>
    </item>
    <item>
      <title>Re: Arcgis API for Python Append Method Error - RuntimeError: Object reference not set to an instance of an object.</title>
      <link>https://community.esri.com/t5/python-questions/arcgis-api-for-python-append-method-error/m-p/110038#M8528</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is a hosted feature layer an acceptable item? The source dataset is a hosted feature layer that can be seen below.&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="jive-emoji image-1 jive-image j-img-original" src="https://community.esri.com/legacyfs/online/487171_Capture.PNG" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Apr 2020 17:46:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcgis-api-for-python-append-method-error/m-p/110038#M8528</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2020-04-02T17:46:42Z</dc:date>
    </item>
    <item>
      <title>Re: Arcgis API for Python Append Method Error - RuntimeError: Object reference not set to an instance of an object.</title>
      <link>https://community.esri.com/t5/python-questions/arcgis-api-for-python-append-method-error/m-p/110039#M8529</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;a featurecollection would be the closest to your case.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;look at the upload_format of the append method.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;You would need to get a featurecollection out of one of the layers of your hosted feature service&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you run into any issues let me know and I’ll write a working code for you but tomorrow because it’s a bit late where I am&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Apr 2020 18:30:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcgis-api-for-python-append-method-error/m-p/110039#M8529</guid>
      <dc:creator>GeofyAdmin</dc:creator>
      <dc:date>2020-04-02T18:30:40Z</dc:date>
    </item>
    <item>
      <title>Re: Arcgis API for Python Append Method Error - RuntimeError: Object reference not set to an instance of an object.</title>
      <link>https://community.esri.com/t5/python-questions/arcgis-api-for-python-append-method-error/m-p/110040#M8530</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Got it, thank you. A working code showing how to get a featurecollection out of the one layer within the hosted feature layer would be much appreciated. Thank you for the assistance.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Apr 2020 18:36:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcgis-api-for-python-append-method-error/m-p/110040#M8530</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2020-04-02T18:36:30Z</dc:date>
    </item>
    <item>
      <title>Re: Arcgis API for Python Append Method Error - RuntimeError: Object reference not set to an instance of an object.</title>
      <link>https://community.esri.com/t5/python-questions/arcgis-api-for-python-append-method-error/m-p/1096590#M62298</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/387645"&gt;@GeofyAdmin&lt;/a&gt;&amp;nbsp;-- if you still have the sample code for this, that would be much appreciated!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 08 Sep 2021 23:56:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcgis-api-for-python-append-method-error/m-p/1096590#M62298</guid>
      <dc:creator>ChadPeltier</dc:creator>
      <dc:date>2021-09-08T23:56:06Z</dc:date>
    </item>
  </channel>
</rss>

