<?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: Overwriting Hosted FeatureTable with Python API does not work (API v. 1.8.2) in ArcGIS Enterprise in ArcGIS API for Python Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-python-questions/overwriting-hosted-featuretable-with-python-api/m-p/1043517#M5876</link>
    <description>&lt;P&gt;Thanks for the info on the bug and your work around. I had the problem in Server/Enterprise 10.7.1.&amp;nbsp; We are upgrading to 10.8.1 and hope the bug is fixed in it.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 02 Apr 2021 20:40:24 GMT</pubDate>
    <dc:creator>Anonymous User</dc:creator>
    <dc:date>2021-04-02T20:40:24Z</dc:date>
    <item>
      <title>Overwriting Hosted FeatureTable with Python API does not work (API v. 1.8.2) in ArcGIS Enterprise</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/overwriting-hosted-featuretable-with-python-api/m-p/1007005#M5270</link>
      <description>&lt;P&gt;I have created a hosted feature table (no location information) from a CSV in my 10.8.1 Portal.&amp;nbsp; Trying to programmatically update this keeps throwing an error:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;feature_table_item = Item(GIS, itemId) #this points to a hosted feature table
flayer_collection = FeatureLayerCollection.fromitem(feature_table_item)
flayer_collection.manager.overwrite(path_to_csv)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The error is&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;---------------------------------------------------------------------------
IndexError                                Traceback (most recent call last)
&amp;lt;ipython-input-25-263240bbee7e&amp;gt; in &amp;lt;module&amp;gt;
----&amp;gt; 1 main()

&amp;lt;ipython-input-24-7c9cf54f40f6&amp;gt; in main()
      8     if IsNewData(csv, cdcili):
      9         print('loading')
---&amp;gt; 10         load(csv, cdcili)
     11         #UpdateCovidDashboard("CDC ILI Data")
     12         #mail("CDC ILI finished at {}".format(datetime.datetime.now()),"CDC ILI Success", getEmailsFromFile(__file__, 'emails.txt'))

&amp;lt;ipython-input-18-6d8668ce2733&amp;gt; in load(csv, cdcili)
     72 def load(csv, cdcili):
     73     cdc_flayer_collection = FeatureLayerCollection.fromitem(cdcili)
---&amp;gt; 74     return cdc_flayer_collection.manager.overwrite(csv)

~\AppData\Local\ESRI\conda\envs\EIM\lib\site-packages\arcgis\features\managers.py in overwrite(self, data_file)
   1361                 "useDescription" : "on"
   1362             }
-&amp;gt; 1363             lyr_url_info = "%s/layers" % feature_layer_item.layers[0].container._url
   1364             fs_url = "%s" % feature_layer_item.layers[0].container._url
   1365             layer_info = self._gis._con.get(lyr_url_info, {'f' : 'json'})

IndexError: list index out of range&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I can see that is looking for the first item in the&amp;nbsp;&lt;EM&gt;layers&lt;/EM&gt; attribute.&amp;nbsp;&lt;/P&gt;&lt;P&gt;However,&amp;nbsp;flayer_collection.layers is an empty array, which explains the IndexError&lt;/P&gt;&lt;P&gt;flayer_collection.tables however is an array with one table item:&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;[&amp;lt;Table url:"https://MyGISServer/arcgis/rest/services/Hosted/MyTable/FeatureServer/0"&amp;gt;]&lt;/PRE&gt;&lt;P&gt;So why does the update method only call on the layers attributes instead of whichever attribute (layers or table) contains the service URL.&amp;nbsp; Ostensibly a hosted feature layer / table will only have ONE service anyway (as opposed to a MapService).&amp;nbsp; Is there an accepted workaround here or am I missing something?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 04 Dec 2020 17:32:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/overwriting-hosted-featuretable-with-python-api/m-p/1007005#M5270</guid>
      <dc:creator>Jay_Gregory</dc:creator>
      <dc:date>2020-12-04T17:32:57Z</dc:date>
    </item>
    <item>
      <title>Re: Overwriting Hosted FeatureTable with Python API does not work (API v. 1.8.2) in ArcGIS Enterprise</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/overwriting-hosted-featuretable-with-python-api/m-p/1041222#M5827</link>
      <description>&lt;P&gt;I have this problem with Server/Enterprise too and get the same error "&lt;SPAN&gt;IndexError: list index out of range".&amp;nbsp; &amp;nbsp; It works with ArcGIS Online.&amp;nbsp; Jay, did you figure this out.&amp;nbsp; &amp;nbsp; Its a little maddening or troublesome that it works with ArcGIS Online and note Enterprise and no one responded to you.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 26 Mar 2021 20:53:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/overwriting-hosted-featuretable-with-python-api/m-p/1041222#M5827</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2021-03-26T20:53:46Z</dc:date>
    </item>
    <item>
      <title>Re: Overwriting Hosted FeatureTable with Python API does not work (API v. 1.8.2) in ArcGIS Enterprise</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/overwriting-hosted-featuretable-with-python-api/m-p/1041229#M5828</link>
      <description>&lt;P&gt;I think I raised a case with Esri and they logged it as a bug:&lt;/P&gt;&lt;P&gt;&lt;A href="https://support.esri.com/en/bugs/nimbus/QlVHLTAwMDEzNjI2MA==" target="_blank"&gt;https://support.esri.com/en/bugs/nimbus/QlVHLTAwMDEzNjI2MA==&lt;/A&gt;&lt;/P&gt;&lt;P&gt;My workaround was using feature classes and getting the geometry to 0,0 for every record.&amp;nbsp; Was only using the data for dashboard widgets .&lt;/P&gt;</description>
      <pubDate>Fri, 26 Mar 2021 21:09:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/overwriting-hosted-featuretable-with-python-api/m-p/1041229#M5828</guid>
      <dc:creator>Jay_Gregory</dc:creator>
      <dc:date>2021-03-26T21:09:17Z</dc:date>
    </item>
    <item>
      <title>Re: Overwriting Hosted FeatureTable with Python API does not work (API v. 1.8.2) in ArcGIS Enterprise</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/overwriting-hosted-featuretable-with-python-api/m-p/1043517#M5876</link>
      <description>&lt;P&gt;Thanks for the info on the bug and your work around. I had the problem in Server/Enterprise 10.7.1.&amp;nbsp; We are upgrading to 10.8.1 and hope the bug is fixed in it.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 02 Apr 2021 20:40:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/overwriting-hosted-featuretable-with-python-api/m-p/1043517#M5876</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2021-04-02T20:40:24Z</dc:date>
    </item>
  </channel>
</rss>

