<?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: Updating hosted Feature Layer utilizing Python in ArcGIS Online Questions</title>
    <link>https://community.esri.com/t5/arcgis-online-questions/updating-hosted-feature-layer-utilizing-python/m-p/1310557#M53497</link>
    <description>&lt;P&gt;If the script has not changed then it could be the data that is causing issue. I would check that the schema to your CSV input is still the same and that the Hosted Feature Layer still exists and can be viewed/edited.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope that helps!&lt;/P&gt;&lt;P&gt;David&lt;/P&gt;</description>
    <pubDate>Fri, 21 Jul 2023 15:59:14 GMT</pubDate>
    <dc:creator>David_McRitchie</dc:creator>
    <dc:date>2023-07-21T15:59:14Z</dc:date>
    <item>
      <title>Updating hosted Feature Layer utilizing Python</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/updating-hosted-feature-layer-utilizing-python/m-p/1309606#M53453</link>
      <description>&lt;P&gt;I've got a Python program that has been running continuously for the past 16-18 months that updates a Hosted Feature Layer within our AGOL account.&lt;/P&gt;&lt;P&gt;The final "write" portion of the code is&lt;/P&gt;&lt;P&gt;data_hold_csv = 'C:\\USGS Live\\HCT - CU\\Clients\\D4_5_Current_Rsvr_Data.csv'#Working file for filter loop&lt;BR /&gt;src=data_hold_csv&lt;BR /&gt;dst = data_omid&lt;BR /&gt;#dst1 = D4_D5_Crrnt_working&lt;BR /&gt;copyfile(src, dst)&lt;BR /&gt;#copyfile(src, dst1)&lt;BR /&gt;gis = GIS("&lt;A href="https://www.arcgis.com" target="_blank"&gt;https://www.arcgis.com&lt;/A&gt;", "user", "password")&lt;BR /&gt;print("We're in ...")&lt;BR /&gt;search_results = gis.content.search('title: D4-5_Current_Rsvr_Data', 'Feature Layer')&lt;BR /&gt;print("Found what we need ... ")&lt;BR /&gt;usgs_fs_item = search_results[0]&lt;BR /&gt;usgs_fs_item&lt;BR /&gt;print("Past the item ... ")&lt;BR /&gt;USGS_flayer_collection = FeatureLayerCollection.fromitem(usgs_fs_item)&lt;BR /&gt;print("Getting ready to overwrite ... ")&lt;BR /&gt;USGS_flayer_collection.manager.overwrite(data_hold)&lt;BR /&gt;print("1.5 - Feature Layer D4-5_Current_Rsvr_Data has been updated for ",client)&lt;BR /&gt;print("")&lt;/P&gt;&lt;P&gt;As of 7/14, I began getting the following error:&lt;/P&gt;&lt;P&gt;Selected site raw data has been extracted for rwpc&lt;BR /&gt;We're in ...&lt;BR /&gt;Found what we need ...&lt;BR /&gt;Past the item ...&lt;BR /&gt;Getting ready to overwrite ...&lt;BR /&gt;Traceback (most recent call last):&lt;BR /&gt;File "C:\USGS Live\HCT - CU\Live_USGS_220020.py", line 497, in &amp;lt;module&amp;gt;&lt;BR /&gt;USGS_flayer_collection.manager.overwrite(data_hold_csv)&lt;BR /&gt;File "C:\Users\Owner\AppData\Local\Programs\Python\Python37-32\lib\site-packages\arcgis\features\managers.py", line 1169, in overwrite&lt;BR /&gt;published_item = related_data_item.publish(publish_parameters, overwrite=True)&lt;BR /&gt;File "C:\Users\Owner\AppData\Local\Programs\Python\Python37-32\lib\site-packages\arcgis\gis\__init__.py", line 6852, in publish&lt;BR /&gt;serviceitem_id = self._check_publish_status(ret, folder)&lt;BR /&gt;File "C:\Users\Owner\AppData\Local\Programs\Python\Python37-32\lib\site-packages\arcgis\gis\__init__.py", line 7089, in _check_publish_status&lt;BR /&gt;raise Exception("Job failed.")&lt;BR /&gt;Exception: Job failed.&lt;/P&gt;&lt;P&gt;What has changed, and how do I work around it?&amp;nbsp; Thanks!&lt;/P&gt;</description>
      <pubDate>Wed, 19 Jul 2023 16:27:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/updating-hosted-feature-layer-utilizing-python/m-p/1309606#M53453</guid>
      <dc:creator>JackieFisher</dc:creator>
      <dc:date>2023-07-19T16:27:42Z</dc:date>
    </item>
    <item>
      <title>Re: Updating hosted Feature Layer utilizing Python</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/updating-hosted-feature-layer-utilizing-python/m-p/1310557#M53497</link>
      <description>&lt;P&gt;If the script has not changed then it could be the data that is causing issue. I would check that the schema to your CSV input is still the same and that the Hosted Feature Layer still exists and can be viewed/edited.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope that helps!&lt;/P&gt;&lt;P&gt;David&lt;/P&gt;</description>
      <pubDate>Fri, 21 Jul 2023 15:59:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/updating-hosted-feature-layer-utilizing-python/m-p/1310557#M53497</guid>
      <dc:creator>David_McRitchie</dc:creator>
      <dc:date>2023-07-21T15:59:14Z</dc:date>
    </item>
  </channel>
</rss>

