hi all, I'm trying to clone ArcGIS online users to another online, but it gives me an error at the last step when calling the Clone function :
note that these accounts are trial only 21 days.
here is the full code from ESRI and I run it on Jupyter notebook:
from arcgis.gis import GIS
from IPython.display import display
Creating user: clone_portal
Unable to create clone_portal 'NoneType' object has no attribute 'update' Unable to create user clone_portal
Can you elaborate on the code that precedes this? What are the variables "target" and "source_users"?
Is "copy_user" a custom function? What does its definition look like?
Great! I'll look it over. But you also might want to check out the code formatting options in the extended post toolbar. Pasting code as regular text is hard to follow, and then there's this little thing:
Hard to say for sure, but I would guess it's happening when you create the new user. In the docs for that function, you can see:
Returns The user if successfully created, None if unsuccessful.
Your error indicates that target_user = None.
I would add a couple lines to check the value of target_user before proceeding to the update, but also look a little closer at the create function to see what's causing it to fail.