<?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: Job Status Failed During Overwrite in ArcGIS API for Python Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-python-questions/job-status-failed-during-overwrite/m-p/1581296#M11126</link>
    <description>&lt;P&gt;hello i just had the same problem.&lt;/P&gt;&lt;P&gt;reuploading the csv cause no problem but publish method with overwrite option fail with the same message.&lt;/P&gt;&lt;P&gt;i solved using the &lt;A href="https://developers.arcgis.com/python/latest/api-reference/arcgis.features.managers.html#arcgis.features.managers.FeatureLayerCollectionManager.overwrite" target="_self"&gt;overwrite method&lt;/A&gt; on a feature layer collection. exemple in &lt;A href="https://developers.arcgis.com/python/latest/samples/overwriting-feature-layers/" target="_self"&gt;this tuto&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;# REPUBLICATION&lt;BR /&gt;&lt;BR /&gt;from arcgis.features import FeatureLayerCollection&lt;BR /&gt;import pandas as pd&lt;BR /&gt;import json&lt;BR /&gt;import os&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;dataFrame = pd.DataFrame(REFERENTIEL_SERVICES)&lt;BR /&gt;dataFrame&lt;BR /&gt;filepath = r'./tmp/'&lt;BR /&gt;try:&lt;BR /&gt;os.mkdir(filepath)&lt;BR /&gt;except:&lt;BR /&gt;print('dossier existant')&lt;BR /&gt;# création du fichier csv depuis le dataframe panda&lt;BR /&gt;dataFrame.to_csv(f'{filepath}/ref_services.csv')&lt;BR /&gt;entries = os.listdir('tmp/')&lt;BR /&gt;print(f'le fichier temporaire {entries} à été correctement créé')&lt;BR /&gt;csv_file=filepath+'ref_services.csv'&lt;BR /&gt;&lt;BR /&gt;# la republication doit passer par une feature layer collection, me demandez pas pourquoi...&lt;BR /&gt;&lt;BR /&gt;target_fs = gis.content.search("yourItemId")&lt;BR /&gt;flayer_collection = FeatureLayerCollection.fromitem(target_fs[0])&lt;BR /&gt;flayer_collection.properties.tables[0].name&lt;BR /&gt;flayer_collection.manager.overwrite(csv_file)&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;# création initiale&lt;BR /&gt;# csv_item = gis.content.add({'type':'CSV','title':'REFERENTIEL_COUCHE'},f'{filepath}/out.csv')&lt;BR /&gt;# display(csv_item)&lt;BR /&gt;# csv_lyr = csv_item.publish({"name":"REFERENTIEL_COUCHE","locationType":"None"})&lt;BR /&gt;# csv_lyr&lt;BR /&gt;# print(csv_lyr = csv_item.publish({"name":"REFERENTIEL_COUCHE","locationType":"None"}))&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 03 Feb 2025 14:30:59 GMT</pubDate>
    <dc:creator>DISIG</dc:creator>
    <dc:date>2025-02-03T14:30:59Z</dc:date>
    <item>
      <title>Job Status Failed During Overwrite</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/job-status-failed-during-overwrite/m-p/848831#M3777</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to systematically overwrite a large point Feature Layer on ArcGIS online using the ArcGIS API for Python. I am closely following the example here:&lt;A class="link-titled" href="https://developers.arcgis.com/python/sample-notebooks/overwriting-feature-layers/" title="https://developers.arcgis.com/python/sample-notebooks/overwriting-feature-layers/"&gt;overwriting_feature_layers | ArcGIS for Developers&lt;/A&gt;&amp;nbsp; and referring to this:&amp;nbsp;&lt;A href="http://esri.github.io/arcgis-python-api/apidoc/html/arcgis.features.managers.html#arcgis.features.managers.FeatureLayerCollectionManager.overwrite"&gt;FeatureLayerCollectionManager - Overwrite&lt;/A&gt; to guide me through the process. However, I keep getting the following error message:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;Traceback (most recent call last):&lt;BR /&gt; File "C:\GIS\AVGOPS\Scripts\extractVehicles_1Week_AGOL.py", line 51, in &amp;lt;module&amp;gt;&lt;BR /&gt; speeds.manager.overwrite(outputFile)&lt;BR /&gt; File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\arcgis\features\managers.py", line 748, in overwrite&lt;BR /&gt; published_item = related_data_item.publish(publish_parameters, overwrite=True)&lt;BR /&gt; File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\arcgis\gis\__init__.py", line 4278, in publish&lt;BR /&gt; serviceitem_id = self._check_publish_status(ret, folder)&lt;BR /&gt; File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\arcgis\gis\__init__.py", line 4390, in _check_publish_status&lt;BR /&gt; raise Exception("Job failed.")&lt;BR /&gt;Exception: Job failed.&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;I am not sure what is happening here. I made sure that the schema, filename and file type are the same as the original upload. The file is large ( about 70000 point features). Could it be timing out?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any advice would help.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&amp;nbsp;&lt;/P&gt;&lt;P&gt;Pat&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Aug 2017 13:31:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/job-status-failed-during-overwrite/m-p/848831#M3777</guid>
      <dc:creator>PatrickFilyer</dc:creator>
      <dc:date>2017-08-11T13:31:33Z</dc:date>
    </item>
    <item>
      <title>Re: Job Status Failed During Overwrite</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/job-status-failed-during-overwrite/m-p/848832#M3778</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am also having this issue. Overwrite works when editing is turned off in the hosted feature layer settings. When editing is turned on, the job fails. I can manually overwrite the feature layer in AGOL by going to the item's overview page and clicking "Update Data" ==&amp;gt; "Overwrite Entire Layer" but running the overwrite through the ArcGIS Python API doesn't seem to work when editing is turned on. As soon as I uncheck editing in the feature layer settings, the code works again. Not sure what is happening here.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Jan 2018 17:21:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/job-status-failed-during-overwrite/m-p/848832#M3778</guid>
      <dc:creator>RobbieBagby</dc:creator>
      <dc:date>2018-01-30T17:21:37Z</dc:date>
    </item>
    <item>
      <title>Re: Job Status Failed During Overwrite</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/job-status-failed-during-overwrite/m-p/1202172#M7637</link>
      <description>&lt;P&gt;I just noticed you posted this solution 4 years ago and it's still an issue. Just wanted to say thanks for your post as it probably saved me hours of a headache looking for a solution as to why I can't update.&lt;/P&gt;</description>
      <pubDate>Thu, 11 Aug 2022 20:23:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/job-status-failed-during-overwrite/m-p/1202172#M7637</guid>
      <dc:creator>AnthonyAtkins2</dc:creator>
      <dc:date>2022-08-11T20:23:36Z</dc:date>
    </item>
    <item>
      <title>Re: Job Status Failed During Overwrite</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/job-status-failed-during-overwrite/m-p/1204583#M7653</link>
      <description>&lt;P&gt;Also, if Sync is enabled this will also throw this error.&lt;/P&gt;</description>
      <pubDate>Fri, 19 Aug 2022 16:01:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/job-status-failed-during-overwrite/m-p/1204583#M7653</guid>
      <dc:creator>StanislausCounty</dc:creator>
      <dc:date>2022-08-19T16:01:52Z</dc:date>
    </item>
    <item>
      <title>Re: Job Status Failed During Overwrite</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/job-status-failed-during-overwrite/m-p/1581296#M11126</link>
      <description>&lt;P&gt;hello i just had the same problem.&lt;/P&gt;&lt;P&gt;reuploading the csv cause no problem but publish method with overwrite option fail with the same message.&lt;/P&gt;&lt;P&gt;i solved using the &lt;A href="https://developers.arcgis.com/python/latest/api-reference/arcgis.features.managers.html#arcgis.features.managers.FeatureLayerCollectionManager.overwrite" target="_self"&gt;overwrite method&lt;/A&gt; on a feature layer collection. exemple in &lt;A href="https://developers.arcgis.com/python/latest/samples/overwriting-feature-layers/" target="_self"&gt;this tuto&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;# REPUBLICATION&lt;BR /&gt;&lt;BR /&gt;from arcgis.features import FeatureLayerCollection&lt;BR /&gt;import pandas as pd&lt;BR /&gt;import json&lt;BR /&gt;import os&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;dataFrame = pd.DataFrame(REFERENTIEL_SERVICES)&lt;BR /&gt;dataFrame&lt;BR /&gt;filepath = r'./tmp/'&lt;BR /&gt;try:&lt;BR /&gt;os.mkdir(filepath)&lt;BR /&gt;except:&lt;BR /&gt;print('dossier existant')&lt;BR /&gt;# création du fichier csv depuis le dataframe panda&lt;BR /&gt;dataFrame.to_csv(f'{filepath}/ref_services.csv')&lt;BR /&gt;entries = os.listdir('tmp/')&lt;BR /&gt;print(f'le fichier temporaire {entries} à été correctement créé')&lt;BR /&gt;csv_file=filepath+'ref_services.csv'&lt;BR /&gt;&lt;BR /&gt;# la republication doit passer par une feature layer collection, me demandez pas pourquoi...&lt;BR /&gt;&lt;BR /&gt;target_fs = gis.content.search("yourItemId")&lt;BR /&gt;flayer_collection = FeatureLayerCollection.fromitem(target_fs[0])&lt;BR /&gt;flayer_collection.properties.tables[0].name&lt;BR /&gt;flayer_collection.manager.overwrite(csv_file)&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;# création initiale&lt;BR /&gt;# csv_item = gis.content.add({'type':'CSV','title':'REFERENTIEL_COUCHE'},f'{filepath}/out.csv')&lt;BR /&gt;# display(csv_item)&lt;BR /&gt;# csv_lyr = csv_item.publish({"name":"REFERENTIEL_COUCHE","locationType":"None"})&lt;BR /&gt;# csv_lyr&lt;BR /&gt;# print(csv_lyr = csv_item.publish({"name":"REFERENTIEL_COUCHE","locationType":"None"}))&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 03 Feb 2025 14:30:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/job-status-failed-during-overwrite/m-p/1581296#M11126</guid>
      <dc:creator>DISIG</dc:creator>
      <dc:date>2025-02-03T14:30:59Z</dc:date>
    </item>
  </channel>
</rss>

