ArcgisHub Python Api for Sites

02-02-2021 04:41 AM
New Contributor II


I'm using the modules and notebooks from and I'm running into difficulties.  The issue I'm experiencing appears to be listed as a bug on the Github site, howerver I'm not fully sure.

I have 2 AGOL organisations and I wan to clone the initiative/site from one or to another using the sample @ cloning and initiative from another org.    I follow the sample and all works until the last piece - the actual cloning ! it errors with 

TypeError: 'NoneType' object is not subscriptable

It actually clones the objectto my secondary agol instance but no content shows up and I dont have access to the site  - it says I don't have permission - and I'm the owner... 

The traceback is 

TypeError                                 Traceback (most recent call last)
In  [164]:
Line 1:     site = hub_basic.initiatives.clone(i1, origin_hub=myHub)

File c:\python_clone_env\arcgispro-py3_additional\src\arcgishub\arcgishub\, in clone:
Line 558:   new_site = self._hub.sites.clone(site, pages=True, title=title)

File c:\python_clone_env\arcgispro-py3_additional\src\arcgishub\arcgishub\, in clone:
Line 652:   _data = self._create_and_register_site(new_item, subdomain, site.definition, content_group_id, collab_group_id)

File c:\python_clone_env\arcgispro-py3_additional\src\arcgishub\arcgishub\, in _create_and_register_site:
Line 340:   client_key = _app_dict['client_id']

TypeError: 'NoneType' object is not subscriptable


 Has anybody got any ideas ?  have I made incorrect assumptions with cloning from instance to instance on AGOL?  Have I missed a step ?   Everything is Public on the origin instance .  Do I have any other options for cloning content between organisations?

Any guidance with this would be hugely appreciated, if I cant get it to work its back to agol assistant and a lot of cut and paste!...   


Tags (3)
0 Kudos
4 Replies
Esri Contributor


I just cloned an initiative in another organization and I noticed that it works fine.

This indeed was a problem in an older version of the API and has been fixed. Are you using an older version of the API or have you updated it in the last two months? If this issue persists after updating the version of the API as it is on the repository as of today, do you mind sending me the initiative id of the initiative you are trying to clone? I will inspect it further.


0 Kudos
New Contributor

Hi there,

I have exactly the same issue than @Department_of_Communications__ 

Could you finally solve it? How?

Thanks a lot!



0 Kudos
Esri Contributor

Hi Alba,

Do you mind confirming for me the version of ArcGIS API for Python (arcgis) that you are using?

0 Kudos
New Contributor

Hi Manushi,

Sure... This is weird, if I check it on ArcGIS Pro the version installed is the 1.8.3 (and I don't have the chance to upload) 


But if I check it on the command window it seems to be 1.8.4 version


So I don't really know wich one is working......

Thanks a lot!!



0 Kudos