Select to view content in your preferred language

Error retrieving job result from Folder.add() after ArcGIS Online October update

274
3
Jump to solution
10-23-2025 09:16 AM
jdyerLACSD
Occasional Contributor

I have a daily ETL that:

  1. Queries new database records
  2. Geocodes addresses in new records
  3. Writes records with geometry to a CSV
  4. Adds the CSV to an ArcGIS Online folder
  5. Publishes CSV
  6. etc...

This script has been running successfully for over a year, but crashed between steps 4 and 5 this morning, presumably due to the latest ArcGIS Online update.  The error message is at the bottom of this post.

I replicated the steps in a notebook with a CSV and a shapefile and received a similar error message in both instances when calling the result() method on the job returned from Folder.add().

ERROR [2025-10-23 08:16:08,104]: FolderException: Could not locate the Item: 66ff687e4ef948ada8ba4367c22a8f68
Traceback (most recent call last):
  File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\gis-pro\Lib\site-packages\arcgis\gis\_impl\_content_manager\folder\core.py", line 631, in _process_item_status
    item = _arcgis_gis.Item(gis=self._gis, itemid=status_msg["itemId"])
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\gis-pro\Lib\site-packages\arcgis\gis\__init__.py", line 13724, in __init__
    if self._has_layers():
       ^^^^^^^^^^^^^^^^^^
  File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\gis-pro\Lib\site-packages\arcgis\gis\__init__.py", line 13860, in _has_layers
    self.type == "Feature Collection"
    ^^^^^^^^^
  File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\gis-pro\Lib\site-packages\arcgis\gis\__init__.py", line 14031, in __getattr__
    self._hydrate()
  File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\gis-pro\Lib\site-packages\arcgis\gis\__init__.py", line 13983, in _hydrate
    itemdict = self._portal.get_item(self.itemid)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\gis-pro\Lib\site-packages\arcgis\gis\_impl\_portalpy.py", line 1430, in get_item
    return self.con.post("content/items/" + itemid, self._postdata())
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\gis-pro\Lib\site-packages\arcgis\gis\_impl\_con\_connection.py", line 1529, in post
    return self._handle_response(
           ^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\gis-pro\Lib\site-packages\arcgis\gis\_impl\_con\_connection.py", line 1004, in _handle_response
    self._handle_json_error(data["error"], errorcode)
  File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\gis-pro\Lib\site-packages\arcgis\gis\_impl\_con\_connection.py", line 1027, in _handle_json_error
    raise Exception(errormessage)
Exception: Item does not exist or is inaccessible.
(Error Code: 400)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "[ETL script path]", line 1048, in <module>
    message = main(args)
              ^^^^^^^^^^
  File "[ETL script path]", line 1005, in main
    msg = updateFacilties(args)
          ^^^^^^^^^^^^^^^^^^^^^
  File "[ETL script path]", line 54, in wrapper
    result = func(*args, **kwargs)
             ^^^^^^^^^^^^^^^^^^^^^
  File "[ETL script path]", line 540, in updateFacilties
    new_csv = new_csv_job.result()
              ^^^^^^^^^^^^^^^^^^^^
  File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\gis-pro\Lib\site-packages\arcgis\gis\_impl\_content_manager\folder\core.py", line 143, in result
    item: _arcgis_gis.Item = self.folder._process_item_status(
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\gis-pro\Lib\site-packages\arcgis\gis\_impl\_content_manager\folder\core.py", line 636, in _process_item_status
    raise FolderException(f"Could not locate the Item: {itemid}")
arcgis.gis._impl._content_manager.folder._exceptions.FolderException: Could not locate the Item: 66ff687e4ef948ada8ba4367c22a8f68
0 Kudos
1 Solution

Accepted Solutions
jdyerLACSD
Occasional Contributor

The script ran without any issues the next day, so I don’t know if it was actually related to the AGO update or some other issue. In any case, everything’s working as expected now. 

View solution in original post

3 Replies
JakeSkinner
Esri Esteemed Contributor

Hi @jdyerLACSD,

Can you post the code you're using?

0 Kudos
StephanieW
Esri Contributor

Hi @jdyerLACSD are you still running into this issue?

0 Kudos
jdyerLACSD
Occasional Contributor

The script ran without any issues the next day, so I don’t know if it was actually related to the AGO update or some other issue. In any case, everything’s working as expected now.