<?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 Failed to create Web Map when cloning in ArcGIS API for Python Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-python-questions/failed-to-create-web-map-when-cloning/m-p/1244825#M8235</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am experimenting with cloning content from ArcGIS Online to Portal. I used the samples from&amp;nbsp;&lt;A href="https://developers.arcgis.com/python/guide/cloning-content/#the-cloning-process" target="_blank" rel="noopener"&gt;https://developers.arcgis.com/python/guide/cloning-content/#the-cloning-process&lt;/A&gt;&lt;/P&gt;&lt;P&gt;I succeeded cloning hosted feature layers, web maps and a web mapping application.&lt;/P&gt;&lt;P&gt;However I'm now running into an error when cloning web maps with this line of code (which I used succesfully before):&lt;/P&gt;&lt;P&gt;cloned_wm = target.content.clone_items(items=[testwm],owner="&amp;lt;portal admin username&amp;gt;")&lt;/P&gt;&lt;P&gt;The response is this:&lt;/P&gt;&lt;PRE&gt;&lt;SPAN class=""&gt;---------------------------------------------------------------------------&lt;/SPAN&gt;
&lt;SPAN class=""&gt;_ItemCreateException&lt;/SPAN&gt;                      Traceback (most recent call last)
In  &lt;SPAN class=""&gt;[9]&lt;/SPAN&gt;:
Line &lt;SPAN class=""&gt;1&lt;/SPAN&gt;:     cloned_wm = target.content.clone_items(items=[testwm],owner=&lt;SPAN class=""&gt;"&lt;/SPAN&gt;&lt;SPAN class=""&gt;portaladmin&lt;/SPAN&gt;&lt;SPAN class=""&gt;"&lt;/SPAN&gt;)

File &lt;SPAN class=""&gt;C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\arcgis\gis\__init__.py&lt;/SPAN&gt;, in &lt;SPAN class=""&gt;clone_items&lt;/SPAN&gt;:
Line &lt;SPAN class=""&gt;5090&lt;/SPAN&gt;:  &lt;SPAN class=""&gt;return&lt;/SPAN&gt; deep_cloner.clone()

File &lt;SPAN class=""&gt;C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\arcgis\_impl\common\_clone.py&lt;/SPAN&gt;, in &lt;SPAN class=""&gt;clone&lt;/SPAN&gt;:
Line &lt;SPAN class=""&gt;748&lt;/SPAN&gt;:   results = executor.submit(&lt;SPAN class=""&gt;self&lt;/SPAN&gt;._clone, executor).result()

File &lt;SPAN class=""&gt;C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\concurrent\futures\_base.py&lt;/SPAN&gt;, in &lt;SPAN class=""&gt;result&lt;/SPAN&gt;:
Line &lt;SPAN class=""&gt;432&lt;/SPAN&gt;:   &lt;SPAN class=""&gt;return&lt;/SPAN&gt; &lt;SPAN class=""&gt;self&lt;/SPAN&gt;.__get_result()

File &lt;SPAN class=""&gt;C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\concurrent\futures\_base.py&lt;/SPAN&gt;, in &lt;SPAN class=""&gt;__get_result&lt;/SPAN&gt;:
Line &lt;SPAN class=""&gt;384&lt;/SPAN&gt;:   &lt;SPAN class=""&gt;raise&lt;/SPAN&gt; &lt;SPAN class=""&gt;self&lt;/SPAN&gt;._exception

File &lt;SPAN class=""&gt;C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\concurrent\futures\thread.py&lt;/SPAN&gt;, in &lt;SPAN class=""&gt;run&lt;/SPAN&gt;:
Line &lt;SPAN class=""&gt;56&lt;/SPAN&gt;:    result = &lt;SPAN class=""&gt;self&lt;/SPAN&gt;.fn(*&lt;SPAN class=""&gt;self&lt;/SPAN&gt;.args, **&lt;SPAN class=""&gt;self&lt;/SPAN&gt;.kwargs)

File &lt;SPAN class=""&gt;C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\arcgis\_impl\common\_clone.py&lt;/SPAN&gt;, in &lt;SPAN class=""&gt;_clone&lt;/SPAN&gt;:
Line &lt;SPAN class=""&gt;735&lt;/SPAN&gt;:   &lt;SPAN class=""&gt;raise&lt;/SPAN&gt; ex

File &lt;SPAN class=""&gt;C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\concurrent\futures\thread.py&lt;/SPAN&gt;, in &lt;SPAN class=""&gt;run&lt;/SPAN&gt;:
Line &lt;SPAN class=""&gt;56&lt;/SPAN&gt;:    result = &lt;SPAN class=""&gt;self&lt;/SPAN&gt;.fn(*&lt;SPAN class=""&gt;self&lt;/SPAN&gt;.args, **&lt;SPAN class=""&gt;self&lt;/SPAN&gt;.kwargs)

File &lt;SPAN class=""&gt;C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\arcgis\_impl\common\_clone.py&lt;/SPAN&gt;, in &lt;SPAN class=""&gt;clone&lt;/SPAN&gt;:
Line &lt;SPAN class=""&gt;2253&lt;/SPAN&gt;:  &lt;SPAN class=""&gt;raise&lt;/SPAN&gt; _ItemCreateException(&lt;SPAN class=""&gt;"&lt;/SPAN&gt;&lt;SPAN class=""&gt;Failed to create &lt;/SPAN&gt;&lt;SPAN class=""&gt;{0}&lt;/SPAN&gt; &lt;SPAN class=""&gt;{1}&lt;/SPAN&gt;&lt;SPAN class=""&gt;: &lt;/SPAN&gt;&lt;SPAN class=""&gt;{2}&lt;/SPAN&gt;&lt;SPAN class=""&gt;"&lt;/SPAN&gt;.format(original_item[&lt;SPAN class=""&gt;'&lt;/SPAN&gt;&lt;SPAN class=""&gt;type&lt;/SPAN&gt;&lt;SPAN class=""&gt;'&lt;/SPAN&gt;], original_item[&lt;SPAN class=""&gt;'&lt;/SPAN&gt;&lt;SPAN class=""&gt;title&lt;/SPAN&gt;&lt;SPAN class=""&gt;'&lt;/SPAN&gt;], &lt;SPAN class=""&gt;str&lt;/SPAN&gt;(ex)), new_item)

&lt;SPAN class=""&gt;_ItemCreateException&lt;/SPAN&gt;: ('Failed to create Web Map &amp;lt;name of web map&amp;gt;: 4', None)
&lt;SPAN class=""&gt;---------------------------------------------------------------------------&lt;BR /&gt;&lt;BR /&gt;I am still trying to figure this out, but not getting anywhere so far. If you have any suggestions, please help!&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 03 Jan 2023 10:31:02 GMT</pubDate>
    <dc:creator>jorisfrenkel</dc:creator>
    <dc:date>2023-01-03T10:31:02Z</dc:date>
    <item>
      <title>Failed to create Web Map when cloning</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/failed-to-create-web-map-when-cloning/m-p/1244825#M8235</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am experimenting with cloning content from ArcGIS Online to Portal. I used the samples from&amp;nbsp;&lt;A href="https://developers.arcgis.com/python/guide/cloning-content/#the-cloning-process" target="_blank" rel="noopener"&gt;https://developers.arcgis.com/python/guide/cloning-content/#the-cloning-process&lt;/A&gt;&lt;/P&gt;&lt;P&gt;I succeeded cloning hosted feature layers, web maps and a web mapping application.&lt;/P&gt;&lt;P&gt;However I'm now running into an error when cloning web maps with this line of code (which I used succesfully before):&lt;/P&gt;&lt;P&gt;cloned_wm = target.content.clone_items(items=[testwm],owner="&amp;lt;portal admin username&amp;gt;")&lt;/P&gt;&lt;P&gt;The response is this:&lt;/P&gt;&lt;PRE&gt;&lt;SPAN class=""&gt;---------------------------------------------------------------------------&lt;/SPAN&gt;
&lt;SPAN class=""&gt;_ItemCreateException&lt;/SPAN&gt;                      Traceback (most recent call last)
In  &lt;SPAN class=""&gt;[9]&lt;/SPAN&gt;:
Line &lt;SPAN class=""&gt;1&lt;/SPAN&gt;:     cloned_wm = target.content.clone_items(items=[testwm],owner=&lt;SPAN class=""&gt;"&lt;/SPAN&gt;&lt;SPAN class=""&gt;portaladmin&lt;/SPAN&gt;&lt;SPAN class=""&gt;"&lt;/SPAN&gt;)

File &lt;SPAN class=""&gt;C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\arcgis\gis\__init__.py&lt;/SPAN&gt;, in &lt;SPAN class=""&gt;clone_items&lt;/SPAN&gt;:
Line &lt;SPAN class=""&gt;5090&lt;/SPAN&gt;:  &lt;SPAN class=""&gt;return&lt;/SPAN&gt; deep_cloner.clone()

File &lt;SPAN class=""&gt;C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\arcgis\_impl\common\_clone.py&lt;/SPAN&gt;, in &lt;SPAN class=""&gt;clone&lt;/SPAN&gt;:
Line &lt;SPAN class=""&gt;748&lt;/SPAN&gt;:   results = executor.submit(&lt;SPAN class=""&gt;self&lt;/SPAN&gt;._clone, executor).result()

File &lt;SPAN class=""&gt;C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\concurrent\futures\_base.py&lt;/SPAN&gt;, in &lt;SPAN class=""&gt;result&lt;/SPAN&gt;:
Line &lt;SPAN class=""&gt;432&lt;/SPAN&gt;:   &lt;SPAN class=""&gt;return&lt;/SPAN&gt; &lt;SPAN class=""&gt;self&lt;/SPAN&gt;.__get_result()

File &lt;SPAN class=""&gt;C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\concurrent\futures\_base.py&lt;/SPAN&gt;, in &lt;SPAN class=""&gt;__get_result&lt;/SPAN&gt;:
Line &lt;SPAN class=""&gt;384&lt;/SPAN&gt;:   &lt;SPAN class=""&gt;raise&lt;/SPAN&gt; &lt;SPAN class=""&gt;self&lt;/SPAN&gt;._exception

File &lt;SPAN class=""&gt;C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\concurrent\futures\thread.py&lt;/SPAN&gt;, in &lt;SPAN class=""&gt;run&lt;/SPAN&gt;:
Line &lt;SPAN class=""&gt;56&lt;/SPAN&gt;:    result = &lt;SPAN class=""&gt;self&lt;/SPAN&gt;.fn(*&lt;SPAN class=""&gt;self&lt;/SPAN&gt;.args, **&lt;SPAN class=""&gt;self&lt;/SPAN&gt;.kwargs)

File &lt;SPAN class=""&gt;C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\arcgis\_impl\common\_clone.py&lt;/SPAN&gt;, in &lt;SPAN class=""&gt;_clone&lt;/SPAN&gt;:
Line &lt;SPAN class=""&gt;735&lt;/SPAN&gt;:   &lt;SPAN class=""&gt;raise&lt;/SPAN&gt; ex

File &lt;SPAN class=""&gt;C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\concurrent\futures\thread.py&lt;/SPAN&gt;, in &lt;SPAN class=""&gt;run&lt;/SPAN&gt;:
Line &lt;SPAN class=""&gt;56&lt;/SPAN&gt;:    result = &lt;SPAN class=""&gt;self&lt;/SPAN&gt;.fn(*&lt;SPAN class=""&gt;self&lt;/SPAN&gt;.args, **&lt;SPAN class=""&gt;self&lt;/SPAN&gt;.kwargs)

File &lt;SPAN class=""&gt;C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\arcgis\_impl\common\_clone.py&lt;/SPAN&gt;, in &lt;SPAN class=""&gt;clone&lt;/SPAN&gt;:
Line &lt;SPAN class=""&gt;2253&lt;/SPAN&gt;:  &lt;SPAN class=""&gt;raise&lt;/SPAN&gt; _ItemCreateException(&lt;SPAN class=""&gt;"&lt;/SPAN&gt;&lt;SPAN class=""&gt;Failed to create &lt;/SPAN&gt;&lt;SPAN class=""&gt;{0}&lt;/SPAN&gt; &lt;SPAN class=""&gt;{1}&lt;/SPAN&gt;&lt;SPAN class=""&gt;: &lt;/SPAN&gt;&lt;SPAN class=""&gt;{2}&lt;/SPAN&gt;&lt;SPAN class=""&gt;"&lt;/SPAN&gt;.format(original_item[&lt;SPAN class=""&gt;'&lt;/SPAN&gt;&lt;SPAN class=""&gt;type&lt;/SPAN&gt;&lt;SPAN class=""&gt;'&lt;/SPAN&gt;], original_item[&lt;SPAN class=""&gt;'&lt;/SPAN&gt;&lt;SPAN class=""&gt;title&lt;/SPAN&gt;&lt;SPAN class=""&gt;'&lt;/SPAN&gt;], &lt;SPAN class=""&gt;str&lt;/SPAN&gt;(ex)), new_item)

&lt;SPAN class=""&gt;_ItemCreateException&lt;/SPAN&gt;: ('Failed to create Web Map &amp;lt;name of web map&amp;gt;: 4', None)
&lt;SPAN class=""&gt;---------------------------------------------------------------------------&lt;BR /&gt;&lt;BR /&gt;I am still trying to figure this out, but not getting anywhere so far. If you have any suggestions, please help!&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 03 Jan 2023 10:31:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/failed-to-create-web-map-when-cloning/m-p/1244825#M8235</guid>
      <dc:creator>jorisfrenkel</dc:creator>
      <dc:date>2023-01-03T10:31:02Z</dc:date>
    </item>
    <item>
      <title>Re: Failed to create Web Map when cloning</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/failed-to-create-web-map-when-cloning/m-p/1244828#M8236</link>
      <description>&lt;P&gt;Got it already, the solution was so simple, but for the record I am posting it here.&lt;/P&gt;&lt;P&gt;The web map that I wanted to clone had an invalid layer. After removing that layer, the cloning process worked allright.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 03 Jan 2023 10:54:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/failed-to-create-web-map-when-cloning/m-p/1244828#M8236</guid>
      <dc:creator>jorisfrenkel</dc:creator>
      <dc:date>2023-01-03T10:54:34Z</dc:date>
    </item>
  </channel>
</rss>

