<?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 Overwrite method not working, and type error returned when loading a spatial data frame to a feature class in ArcGIS API for Python Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-python-questions/overwrite-method-not-working-and-type-error/m-p/809753#M2423</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am trying to overwrite a feature layer in AGOL using the Python api. However, the wrong number of records are returned.&lt;/P&gt;&lt;P&gt;See this previous post&amp;nbsp;&lt;A href="https://community.esri.com/thread/209175"&gt;Overwrite not working, wrong number of records returned&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It does not seem like this issue has been resolved as of yet.&lt;/P&gt;&lt;P&gt;So I tried to use the edit method instead. However it is returning a type error when I use a polygon layer. (it works fine with point files, it is only problematic with non-point files)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sdf1 = SpatialDataFrame.from_featureclass(r'C:\Users\me\Documents\ArcGIS\Saved.gdb\Open_Space')&lt;BR /&gt; &lt;BR /&gt; fs = sdf1.to_featureset()&lt;BR /&gt; parcel.edit_features(adds=fs)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Error:&lt;/P&gt;&lt;P&gt;File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\arcgis\features\_data\geodataset\geodataframe.py", line 1349, in from_featureclass&lt;BR /&gt; return from_featureclass(filename=filename, **kwargs)&lt;BR /&gt; File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\arcgis\features\_data\geodataset\io\fileops.py", line 213, in from_featureclass&lt;BR /&gt; if row[geom_idx].type in ['polyline', 'polygon']:&lt;BR /&gt;AttributeError: 'NoneType' object has no attribute 'type'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks Anne&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 16 Aug 2018 17:12:57 GMT</pubDate>
    <dc:creator>annegrimes2</dc:creator>
    <dc:date>2018-08-16T17:12:57Z</dc:date>
    <item>
      <title>Overwrite method not working, and type error returned when loading a spatial data frame to a feature class</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/overwrite-method-not-working-and-type-error/m-p/809753#M2423</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am trying to overwrite a feature layer in AGOL using the Python api. However, the wrong number of records are returned.&lt;/P&gt;&lt;P&gt;See this previous post&amp;nbsp;&lt;A href="https://community.esri.com/thread/209175"&gt;Overwrite not working, wrong number of records returned&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It does not seem like this issue has been resolved as of yet.&lt;/P&gt;&lt;P&gt;So I tried to use the edit method instead. However it is returning a type error when I use a polygon layer. (it works fine with point files, it is only problematic with non-point files)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sdf1 = SpatialDataFrame.from_featureclass(r'C:\Users\me\Documents\ArcGIS\Saved.gdb\Open_Space')&lt;BR /&gt; &lt;BR /&gt; fs = sdf1.to_featureset()&lt;BR /&gt; parcel.edit_features(adds=fs)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Error:&lt;/P&gt;&lt;P&gt;File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\arcgis\features\_data\geodataset\geodataframe.py", line 1349, in from_featureclass&lt;BR /&gt; return from_featureclass(filename=filename, **kwargs)&lt;BR /&gt; File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\arcgis\features\_data\geodataset\io\fileops.py", line 213, in from_featureclass&lt;BR /&gt; if row[geom_idx].type in ['polyline', 'polygon']:&lt;BR /&gt;AttributeError: 'NoneType' object has no attribute 'type'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks Anne&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Aug 2018 17:12:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/overwrite-method-not-working-and-type-error/m-p/809753#M2423</guid>
      <dc:creator>annegrimes2</dc:creator>
      <dc:date>2018-08-16T17:12:57Z</dc:date>
    </item>
  </channel>
</rss>

