Esri-Private-Sector-SEs / gbd-migration

Migration project to consolidate various orgs within the Commercial GBD team.
0 stars 0 forks source link

Migration Works Fully, Correct JSON format and Items swizzled, but exception thrown at the end of file. #24

Open rfreedBusiness opened 9 months ago

rfreedBusiness commented 9 months ago
"""CONSTANTS""" 

CATALOG_ID = "5f063e88ec8045c9a2add580deb3b776"
ORIGIN_TRANSFER_USER = "transfer_inscomm"
ORIGIN_URL = "https://inscomm.maps.arcgis.com/"
ITEM_ID = "4b9ca5b16138462fa9fa5a5a8c77b337"
Creating destination folder for dashboard Boston Policy Monitor ...
Transferring Boston Policies to destination org, moving to Web Content transfer workflow ... 
Performing Web Content transfer for the following items: 
Boston Policies
Item(s) cloned successfully. Updating tags ... 
Web Content Transfer complete.
Moving Houses to folder Boston Policy Monitor ... 
Moving Policy Boundary to folder Boston Policy Monitor ... 
Moving Boston Policies to folder Boston Policy Monitor ... 
Transferring Boston Policy Imagery to destination org, moving to Web Content transfer workflow ... 
Performing Web Content transfer for the following items: 
Boston Policy Imagery
Item(s) cloned successfully. Updating tags ... 
Web Content Transfer complete.
Moving Boston Policy Imagery to folder Boston Policy Monitor ... 
Participating items handled, transferring dashboard Boston Policy Monitor ... 
Already existent or Living Atlas items excluded from cloning. Check info-level logs for details.
---------------------------------------------------------------------------
Exception                                 Traceback (most recent call last)
/tmp/ipykernel_86/3793353524.py in <cell line: 1>()
----> 1 transfer()

/tmp/ipykernel_86/2533037079.py in transfer()
    345         sm_transfer(destination=destination, item=item_origin, logging=True, records=catalog)
    346     elif item_origin.type == "Dashboard":
--> 347         dash_transfer(destination=destination, dash=item_origin, swizzle=False, logging=True, records=catalog)
    348     else:
    349         wc_transfer(destination=destination, items=[item_origin])

/tmp/ipykernel_86/2533037079.py in dash_transfer(destination, dash, swizzle, records, logging)
    171     print(f"Participating items handled, transferring dashboard {dash.title} ... ")
    172 
--> 173     dest_dash = destination.content.clone_items(items=[dash], item_mapping=wm_items, folder=dash.title)
    174 
    175     now = datetime.now()

/opt/conda/lib/python3.9/site-packages/arcgis/gis/__init__.py in clone_items(self, items, folder, item_extent, use_org_basemap, copy_data, copy_global_ids, search_existing_items, item_mapping, group_mapping, owner, preserve_item_id, **kwargs)
   8560             wab_code_attach=kwargs.pop("copy_code_attachment", True),
   8561         )
-> 8562         return deep_cloner.clone()
   8563 
   8564     def bulk_update(

/opt/conda/lib/python3.9/site-packages/arcgis/_impl/common/_clone.py in clone(self)
   1320         else:
   1321             with concurrent.futures.ThreadPoolExecutor(max_workers=20) as executor:
-> 1322                 results = executor.submit(self._clone, executor).result()
   1323                 return results
   1324 

/opt/conda/lib/python3.9/concurrent/futures/_base.py in result(self, timeout)
    444                     raise CancelledError()
    445                 elif self._state == FINISHED:
--> 446                     return self.__get_result()
    447                 else:
    448                     raise TimeoutError()

/opt/conda/lib/python3.9/concurrent/futures/_base.py in __get_result(self)
    389         if self._exception:
    390             try:
--> 391                 raise self._exception
    392             finally:
    393                 # Break a reference cycle with the exception in self._exception

/opt/conda/lib/python3.9/concurrent/futures/thread.py in run(self)
     56 
     57         try:
---> 58             result = self.fn(*self.args, **self.kwargs)
     59         except BaseException as exc:
     60             self.future.set_exception(exc)

/opt/conda/lib/python3.9/site-packages/arcgis/_impl/common/_clone.py in _clone(self, excecutor)
   1221         :return:
   1222         """
-> 1223         self._clone_init()
   1224 
   1225         leaf_nodes = self._get_leaf_nodes()

/opt/conda/lib/python3.9/site-packages/arcgis/_impl/common/_clone.py in _clone_init(self)
   1131                     break
   1132             if not original_item:
-> 1133                 raise Exception(
   1134                     'Item "{0}" does not exist in the source portal'.format(
   1135                         original_item_id

Exception: Item "14eec1c8c100457a975368368c7179ee" does not exist in the source portal
rfreedBusiness commented 9 months ago

Item "14eec1c8c100457a975368368c7179ee" DOES exist in source portal.