Describe the bug
Cloning item 05ace607387b44d7b8537265e646988d gives error:
File "/opt/conda/lib/python3.12/site-packages/arcgis/_impl/common/_clone.py", line 2826, in _add_features
layers[0].container.manager.update_definition(edit_params)
~~~~~~^^^
KeyError: 0
Key error is raised, because layers
parameter is dictionary with layer id 35
.
To Reproduce
Steps to reproduce the behavior:
source_content:ContentManager = source_gis.content source_item = source_content.get("05ace607387b44d7b8537265e646988d") target_content:ContentManager = target_gis.content try: for cloned_item in target_content.clone_items([ source_item ], search_existing_items = False, preserve_editing_info = True, ): logger.info(f'Cloned item: {cloned_item.itemid} {cloned_item}') except: logger.warning(f"Failed clone {source_item.itemid}", exc_info=True)
error:
Traceback (most recent call last): File "/REDACTED.py", line 27, in REDACTED for cloned_item in target_content.clone_items([ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/conda/lib/python3.12/site-packages/arcgis/gis/__init__.py", line 8757, in clone_items return deep_cloner.clone() ^^^^^^^^^^^^^^^^^^^ File "/opt/conda/lib/python3.12/site-packages/arcgis/_impl/common/_clone.py", line 1347, in clone results = executor.submit(self._clone, executor).result() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/conda/lib/python3.12/concurrent/futures/_base.py", line 456, in result return self.__get_result() ^^^^^^^^^^^^^^^^^^^ File "/opt/conda/lib/python3.12/concurrent/futures/_base.py", line 401, in __get_result raise self._exception File "/opt/conda/lib/python3.12/concurrent/futures/thread.py", line 58, in run result = self.fn(*self.args, **self.kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/conda/lib/python3.12/site-packages/arcgis/_impl/common/_clone.py", line 1321, in _clone raise ex File "/opt/conda/lib/python3.12/concurrent/futures/thread.py", line 58, in run result = self.fn(*self.args, **self.kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/conda/lib/python3.12/site-packages/arcgis/_impl/common/_clone.py", line 4270, in clone raise _ItemCreateException( arcgis._impl.common._clone._ItemCreateException: ('Failed to create REDACTED)
Expected behavior
Expected cloned item appear in target.
Platform (please complete the following information):
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4