<?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 Re: ArcGIS API for Python: clone_items error in ArcGIS API for Python Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-python-questions/arcgis-api-for-python-clone-items-error/m-p/814435#M2588</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, I'm using Python 3.7.1 32 bit.&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/440454_pastedImage_1.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 26 Mar 2019 21:21:30 GMT</pubDate>
    <dc:creator>AlanTabbernor</dc:creator>
    <dc:date>2019-03-26T21:21:30Z</dc:date>
    <item>
      <title>ArcGIS API for Python: clone_items error</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/arcgis-api-for-python-clone-items-error/m-p/814433#M2586</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to use clone_items for ArcGIS API for Python.&amp;nbsp; I am trying to clone a map to another AGOL folder which should copy the map and all dependent items to the specified folder.&amp;nbsp; This works for other maps in my content but it is failing for the specific map I need to copy today.&amp;nbsp; Does anyone know why this would be failing?&amp;nbsp; I get the following error(s).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Traceback (most recent call last):&lt;BR /&gt; File "C:\Users\xxx\AppData\Local\Programs\Python\Python37-32\lib\site-packages\arcgis\_impl\common\_clone.py", line 1913, in clone&lt;BR /&gt; self._add_features(new_layers, relationships, layer_field_mapping, feature_service.properties['spatialReference'])&lt;BR /&gt; File "C:\Users\xxx\AppData\Local\Programs\Python\Python37-32\lib\site-packages\arcgis\_impl\common\_clone.py", line 1281, in _add_features&lt;BR /&gt; object_id_mapping[layer_id] = {layer_features&lt;I&gt;['attributes'][object_id_field] : add_results&lt;I&gt;['objectId'] for i in range(0, len(layer_features))}&lt;BR /&gt; File "C:\Users\xxx\AppData\Local\Programs\Python\Python37-32\lib\site-packages\arcgis\_impl\common\_clone.py", line 1281, in &amp;lt;dictcomp&amp;gt;&lt;BR /&gt; object_id_mapping[layer_id] = {layer_features&lt;I&gt;['attributes'][object_id_field] : add_results&lt;I&gt;['objectId'] for i in range(0, len(layer_features))}&lt;BR /&gt;IndexError: list index out of range&lt;/I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/P&gt;&lt;P&gt;During handling of the above exception, another exception occurred:&lt;/P&gt;&lt;P&gt;Traceback (most recent call last):&lt;BR /&gt; File "r:\GIS_Warehouse\Production\Projects\CVRP\Scripts\promoteAGOL.py", line 107, in &amp;lt;module&amp;gt;&lt;BR /&gt; main()&lt;BR /&gt; File "r:\GIS_Warehouse\Production\Projects\CVRP\Scripts\promoteAGOL.py", line 92, in main&lt;BR /&gt; successItems = ag.content.clone_items(cloneArray, folder=promoteFolder, search_existing_items=False)&lt;BR /&gt; File "C:\Users\xxx\AppData\Local\Programs\Python\Python37-32\lib\site-packages\arcgis\gis\__init__.py", line 4034, in clone_items&lt;BR /&gt; return deep_cloner.clone()&lt;BR /&gt; File "C:\Users\xxx\AppData\Local\Programs\Python\Python37-32\lib\site-packages\arcgis\_impl\common\_clone.py", line 676, in clone&lt;BR /&gt; results = executor.submit(self._clone, executor).result()&lt;BR /&gt; File "C:\Users\xxx\AppData\Local\Programs\Python\Python37-32\lib\concurrent\futures\_base.py", line 432, in result&lt;BR /&gt; return self.__get_result()&lt;BR /&gt; File "C:\Users\xxx\AppData\Local\Programs\Python\Python37-32\lib\concurrent\futures\_base.py", line 384, in __get_result&lt;BR /&gt; raise self._exception&lt;BR /&gt; File "C:\Users\xxx\AppData\Local\Programs\Python\Python37-32\lib\concurrent\futures\thread.py", line 57, in run&lt;BR /&gt; result = self.fn(*self.args, **self.kwargs)&lt;BR /&gt; File "C:\Users\xxx\AppData\Local\Programs\Python\Python37-32\lib\site-packages\arcgis\_impl\common\_clone.py", line 663, in _clone&lt;BR /&gt; raise ex&lt;BR /&gt; File "C:\Users\xxx\AppData\Local\Programs\Python\Python37-32\lib\concurrent\futures\thread.py", line 57, in run&lt;BR /&gt; result = self.fn(*self.args, **self.kwargs)&lt;BR /&gt; File "C:\Users\xxx\AppData\Local\Programs\Python\Python37-32\lib\site-packages\arcgis\_impl\common\_clone.py", line 1922, in clone&lt;BR /&gt; raise _ItemCreateException("Failed to create {0} {1}: {2}".format(original_item['type'], original_item['title'], str(ex)), new_item)&lt;BR /&gt;arcgis._impl.common._clone._ItemCreateException: ('Failed to create Feature Service xxx: list index out of range', &amp;lt;Item title:"xxx" type:Feature Layer Collection owner:xxx&amp;gt;)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Mar 2019 19:24:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/arcgis-api-for-python-clone-items-error/m-p/814433#M2586</guid>
      <dc:creator>AlanTabbernor</dc:creator>
      <dc:date>2019-03-26T19:24:10Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS API for Python: clone_items error</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/arcgis-api-for-python-clone-items-error/m-p/814434#M2587</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;are you using python 3.7 32bit?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Mar 2019 21:19:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/arcgis-api-for-python-clone-items-error/m-p/814434#M2587</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2019-03-26T21:19:33Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS API for Python: clone_items error</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/arcgis-api-for-python-clone-items-error/m-p/814435#M2588</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, I'm using Python 3.7.1 32 bit.&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/440454_pastedImage_1.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Mar 2019 21:21:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/arcgis-api-for-python-clone-items-error/m-p/814435#M2588</guid>
      <dc:creator>AlanTabbernor</dc:creator>
      <dc:date>2019-03-26T21:21:30Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS API for Python: clone_items error</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/arcgis-api-for-python-clone-items-error/m-p/814436#M2589</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A class="link-titled" href="https://developers.arcgis.com/python/guide/install-and-set-up/" title="https://developers.arcgis.com/python/guide/install-and-set-up/"&gt;Install and set up | ArcGIS for Developers&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;you should be using the version of python that comes with the install.&amp;nbsp; Minimum python 3.5 BUT&amp;nbsp; if you are using the anaconda distribution associated with ArcGIS Pro, that is python 3.6.* 64 bit.&amp;nbsp; I am not sure whether bumping version to 3.7 but bitness down is appropriate.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Mar 2019 21:33:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/arcgis-api-for-python-clone-items-error/m-p/814436#M2589</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2019-03-26T21:33:41Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS API for Python: clone_items error</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/arcgis-api-for-python-clone-items-error/m-p/814437#M2590</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm not sure I understand.&amp;nbsp; I just used pip install arcgis in order to get the API.&amp;nbsp; Is this not the correct way to install?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;clone_items does work for me to clone different web maps, it just does not work for this one particular web map.&amp;nbsp; In fact my guess is that there is one particular feature layer that seems to cause issues as it references this feature layer when giving the error 'list index out of range'.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Mar 2019 21:50:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/arcgis-api-for-python-clone-items-error/m-p/814437#M2590</guid>
      <dc:creator>AlanTabbernor</dc:creator>
      <dc:date>2019-03-26T21:50:40Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS API for Python: clone_items error</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/arcgis-api-for-python-clone-items-error/m-p/814438#M2591</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A class="link-titled" href="https://anaconda.org/esri/arcgis" title="https://anaconda.org/esri/arcgis"&gt;https://anaconda.org/esri/arcgis&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;CODE style="background-color: #eeeff0; border-image-outset: 0; border-image-repeat: stretch; border-image-slice: 100%; border-image-source: none; border-image-width: 1; box-sizing: border-box; color: #333333; font-family: Consolas,Liberation Mono,Courier,monospace; font-size: 1em; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px; padding: 0.12rem 0.31rem 0.06rem 0.31rem; border: 0.1rem solid #c5c9cc;"&gt;conda install -c esri arcgis &lt;/CODE&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Mar 2019 22:18:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/arcgis-api-for-python-clone-items-error/m-p/814438#M2591</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2019-03-26T22:18:42Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS API for Python: clone_items error</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/arcgis-api-for-python-clone-items-error/m-p/814439#M2592</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for your help so far.&amp;nbsp; I tried installing anaconda (tried both 32 bit and 64 bit) and installing the arcgis api as you suggested from the anaconda prompt.&amp;nbsp; I then ran my script using the anaconda prompt but the line where I attempt to clone_items still gives me the same error.&amp;nbsp; Interestingly it references a different feature layer now but still gives me the 'list index out of range error'.&amp;nbsp; I should note that I do not currently have ArcGIS Pro installed.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Mar 2019 23:12:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/arcgis-api-for-python-clone-items-error/m-p/814439#M2592</guid>
      <dc:creator>AlanTabbernor</dc:creator>
      <dc:date>2019-03-26T23:12:51Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS API for Python: clone_items error</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/arcgis-api-for-python-clone-items-error/m-p/814440#M2593</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Oh.. that might explain it. If/when you install ArcGIS Pro, you might have a whole world of other issues because of multiple instances of python installations.&amp;nbsp; One anaconda installation provided by pro will allow you to create different environments if needed.&amp;nbsp; It will also allow you to work with arcpy and not rely on other packages to work with geometries.&lt;/P&gt;&lt;P&gt;I suspect someone else might want to weigh in if they have a solution to fix this situation.&amp;nbsp; My suggestion would be to uninstall everything, and install Pro so you have a pristine environment that you can manage (I don't even install arcmap)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Mar 2019 23:18:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/arcgis-api-for-python-clone-items-error/m-p/814440#M2593</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2019-03-26T23:18:38Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS API for Python: clone_items error</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/arcgis-api-for-python-clone-items-error/m-p/814441#M2594</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Alan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let's take a step back and tell me if I'm correct:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;You're using a standalone installation (i.e. anaconda, no Pro)&lt;/LI&gt;&lt;LI&gt;You're on the latest version of the API 1.6.0?&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Using pip is fine, but it would probably be better to let anaconda handle package management. In any case, if you're not making use of arcpy then using a standalone installation usually simplifies matters.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A few questions:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Where are you cloning from and where are you cloning to - i.e., what are the source and target portals and their versions?&lt;/LI&gt;&lt;LI&gt;Regarding the Web Map that won't clone, what can you tell us about the services in the map? Are those ArcGIS Server services - if so, which version?&lt;/LI&gt;&lt;/UL&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Mar 2019 15:07:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/arcgis-api-for-python-clone-items-error/m-p/814441#M2594</guid>
      <dc:creator>EarlMedina</dc:creator>
      <dc:date>2019-03-27T15:07:30Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS API for Python: clone_items error</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/arcgis-api-for-python-clone-items-error/m-p/814442#M2595</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Earl,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yes, I'm using a standalone installation. (No Pro).&amp;nbsp; I was not using anaconda until yesterday when Dan suggested this, I was just using Python 3.7.1 and ensured I had the latest version of the API as I used "pip install arcgis upgrade" when I was first having issues.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am just cloning from one folder in ArcGIS Online (not Portal) to another, all within "My Content".&lt;/P&gt;&lt;P&gt;Almost all of the services in the web map are ArcGIS Online Feature Layers.&amp;nbsp; The only one that is different is I am pulling Stamen Base Map tiles using "Add Layers from Web".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'll just mention again that my script has worked doing this same task many times in the past.&amp;nbsp; I even tried the same thing on a different map yesterday and it worked no problem.&amp;nbsp; It is just this one map (or perhaps one of the features layers within it) that is giving the script trouble.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Alan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Mar 2019 16:44:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/arcgis-api-for-python-clone-items-error/m-p/814442#M2595</guid>
      <dc:creator>AlanTabbernor</dc:creator>
      <dc:date>2019-03-27T16:44:01Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS API for Python: clone_items error</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/arcgis-api-for-python-clone-items-error/m-p/814443#M2596</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Alan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It sounds like a process of elimination might be the best approach. There's nothing too revealing in the errors. It sounds like if you clone another Web Map with the&amp;nbsp;&lt;SPAN style="background-color: #ffffff;"&gt;Stamen Base Map that it succeeds?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;-Earl&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Mar 2019 18:53:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/arcgis-api-for-python-clone-items-error/m-p/814443#M2596</guid>
      <dc:creator>EarlMedina</dc:creator>
      <dc:date>2019-03-28T18:53:49Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS API for Python: clone_items error</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/arcgis-api-for-python-clone-items-error/m-p/814444#M2597</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Earl,&lt;/P&gt;&lt;P&gt;Yes, it does succeed.&amp;nbsp; In fact the purpose of this clone_items script is to create a backup of this particular map and associated feature layers.&amp;nbsp; If I clone a map that was previously backed up a few weeks ago it succeeds.&amp;nbsp; I have now made a few changes to my 'master copy' map and wish to back it up again.&amp;nbsp; This is the map for which it fails.&lt;/P&gt;&lt;P&gt;These two maps are therefore almost exactly the same.&amp;nbsp; There has been minor updates made to the data (feature layers), one new feature layer added, and some small changes to things like pop-ups, etc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Alan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Mar 2019 19:27:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/arcgis-api-for-python-clone-items-error/m-p/814444#M2597</guid>
      <dc:creator>AlanTabbernor</dc:creator>
      <dc:date>2019-03-28T19:27:29Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS API for Python: clone_items error</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/arcgis-api-for-python-clone-items-error/m-p/814445#M2598</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Have you tried another way to do it? If you like, you can try copying the items:&lt;/P&gt;&lt;P&gt;&lt;A href="https://developers.arcgis.com/python/sample-notebooks/clone-portal-users-groups-and-content/#Copy-Items"&gt;https://developers.arcgis.com/python/sample-notebooks/clone-portal-users-groups-and-content/#Copy-Items&lt;/A&gt;&lt;/P&gt;&lt;P&gt;The above script might give you more granular control over the whole process when compared to clone_items.&lt;/P&gt;&lt;P&gt;I cloned my whole portal into a staging environment using 4 python scripts (copy the users, groups, items and reconstruct the relationships).&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Apr 2019 02:51:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/arcgis-api-for-python-clone-items-error/m-p/814445#M2598</guid>
      <dc:creator>simoxu</dc:creator>
      <dc:date>2019-04-08T02:51:35Z</dc:date>
    </item>
  </channel>
</rss>

