Failed to create Web Map when cloning

68
1
Jump to solution
3 weeks ago
Labels(1)
jorisfrenkel
Occasional Contributor II

Hi,

I am experimenting with cloning content from ArcGIS Online to Portal. I used the samples fromhttps://developers.arcgis.com/python/guide/cloning-content/#the-cloning-process

I succeeded cloning hosted feature layers, web maps and a web mapping application.

However I'm now running into an error when cloning web maps with this line of code (which I used succesfully before):

cloned_wm = target.content.clone_items(items=[testwm],owner="")

The response is this:

---------------------------------------------------------------------------_ItemCreateExceptionTraceback (most recent call last) In[9]: Line1: cloned_wm = target.content.clone_items(items=[testwm],owner="portaladmin") FileC:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\arcgis\gis\__init__.py, inclone_items: Line5090:returndeep_cloner.clone() FileC:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\arcgis\_impl\common\_clone.py, inclone: Line748: results = executor.submit(self._clone, executor).result() FileC:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\concurrent\futures\_base.py, inresult: Line432:returnself.__get_result() FileC:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\concurrent\futures\_base.py, in__get_result: Line384:类风湿性关节炎iseself._exception FileC:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\concurrent\futures\thread.py, inrun: Line56: result =self.fn(*self.args, **self.kwargs) FileC:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\arcgis\_impl\common\_clone.py, in_clone: Line735:类风湿性关节炎ise交货文件C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\concurrent\futures\thread.py, inrun: Line56: result =self.fn(*self.args, **self.kwargs) FileC:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\arcgis\_impl\common\_clone.py, inclone: Line2253:类风湿性关节炎ise_ItemCreateException("Failed to create{0}{1}:{2}".format(original_item['type'], original_item['title'],str(ex)), new_item)_ItemCreateException: ('Failed to create Web Map : 4', None)---------------------------------------------------------------------------

I am still trying to figure this out, but not getting anywhere so far. If you have any suggestions, please help!

Tags(2)
0Kudos
1 Solution

Accepted Solutions
jorisfrenkel
Occasional Contributor II

Got it already, the solution was so simple, but for the record I am posting it here.

The web map that I wanted to clone had an invalid layer. After removing that layer, the cloning process worked allright.

View solution in original post

0Kudos
1 Reply
jorisfrenkel
Occasional Contributor II

Got it already, the solution was so simple, but for the record I am posting it here.

The web map that I wanted to clone had an invalid layer. After removing that layer, the cloning process worked allright.

0Kudos