AnsweredAssumed Answered

Receiving error when using clone_items()

Question asked by CClaessens-esristaff Employee on Jan 17, 2018
Latest reply on Dec 26, 2018 by seima



I'm receiving the following error when attempting to clone items: 


Traceback (most recent call last):

  File "<ipython-input-92-d5f15aa1088b>", line 1, in <module>
    gis.content.clone_items(['4ef',  '5ef'])

  File "/Users/cour7816/anaconda3/lib/python3.6/site-packages/arcgis/gis/", line 2483, in clone_items
    clone._get_item_definitions(item, item_definitions)

  File "/Users/cour7816/anaconda3/lib/python3.6/site-packages/arcgis/_impl/common/", line 1556, in _get_item_definitions
    source = item._gis

AttributeError: 'str' object has no attribute '_gis'


This is my simple code:

from arcgis.gis import GIS 
from arcgis.gis import ContentManager as content

gis = GIS("", "", "")

gis.content.clone_items(['4ef', '5ef'])


(Where 4ef and 5ef are my full item ids)


Am I doing something wrong here? Thanks!