Cloning a Workforce Project?

195
0
07-03-2019 11:59 AM
ChaimSchwartz4
Occasional Contributor

Hi, 

When attempting to clone a workforce project with the following code (AGOL to AGOL), I'm receiving a "UnboundLocalError: local variable 'user' referenced before assignment" error. Any ideas? The same code works well for cloning a standalone feature class (such as the workforce assignment layer), and I'm pretty sure it worked on workforce projects in the past as well.

from arcgis.gis import GIS

gis1 = GIS("https://org1.maps.arcgis.com", "user1", "XXXXXX")
gis2 = GIS("https://org2.maps.arcgis.com/", "user2", "XXXXXX")

item = gis1.content.get("XXXXXXXXXXXXXXXXXXXXXXXXX")

gis2.content.clone_items([item])
‍‍‍‍‍‍‍‍
0 Kudos
0 Replies