<?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 ArcgisHub Python Api for Sites in ArcGIS Hub Questions</title>
    <link>https://community.esri.com/t5/arcgis-hub-questions/arcgishub-python-api-for-sites/m-p/1022495#M4183</link>
    <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;I'm using the modules and notebooks from&amp;nbsp;&lt;A href="https://www.esri.com/arcgis-blog/products/arcgis-hub/announcements/introducing-arcgis-hub-python-api-for-sites/" target="_blank" rel="noopener"&gt;https://www.esri.com/arcgis-blog/products/arcgis-hub/announcements/introducing-arcgis-hub-python-api-for-sites/&lt;/A&gt;&amp;nbsp;and I'm running into difficulties.&amp;nbsp; The issue I'm experiencing appears to be listed as a bug on the Github site, howerver I'm not fully sure.&lt;/P&gt;&lt;P&gt;I have 2 AGOL organisations and I wan to clone the initiative/site from one or to another using the sample&amp;nbsp;@&amp;nbsp;&lt;A href="https://github.com/Esri/hub-py/tree/master/examples/For%20arcgishub%20library" target="_blank" rel="noopener"&gt;https://github.com/Esri/hub-py/tree/master/examples/For%20arcgishub%20library&lt;/A&gt;&amp;nbsp;cloning and initiative from another org.&amp;nbsp; &amp;nbsp; I follow the sample and all works until the last piece - the actual cloning ! it errors with&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;SPAN class="ansi-red-fg"&gt;TypeError&lt;/SPAN&gt;: 'NoneType' object is not subscriptable&lt;/PRE&gt;&lt;P&gt;It actually clones the objectto my secondary agol instance but no content shows up and I dont have access to the site&amp;nbsp; - it says I don't have permission - and I'm the owner...&amp;nbsp;&lt;/P&gt;&lt;P&gt;The traceback is&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;SPAN class="ansi-red-fg"&gt;TypeError&lt;/SPAN&gt;                                 Traceback (most recent call last)
In  &lt;SPAN class="ansi-blue-fg"&gt;[164]&lt;/SPAN&gt;:
Line &lt;SPAN class="ansi-blue-fg"&gt;1&lt;/SPAN&gt;:     site = hub_basic.initiatives.clone(i1, origin_hub=myHub)

File &lt;SPAN class="ansi-blue-fg"&gt;c:\python_clone_env\arcgispro-py3_additional\src\arcgishub\arcgishub\hub.py&lt;/SPAN&gt;, in &lt;SPAN class="ansi-green-fg"&gt;clone&lt;/SPAN&gt;:
Line &lt;SPAN class="ansi-blue-fg"&gt;558&lt;/SPAN&gt;:   new_site = &lt;SPAN class="ansi-cyan-fg"&gt;self&lt;/SPAN&gt;._hub.sites.clone(site, pages=&lt;SPAN class="ansi-blue-fg"&gt;True&lt;/SPAN&gt;, title=title)

File &lt;SPAN class="ansi-blue-fg"&gt;c:\python_clone_env\arcgispro-py3_additional\src\arcgishub\arcgishub\sites.py&lt;/SPAN&gt;, in &lt;SPAN class="ansi-green-fg"&gt;clone&lt;/SPAN&gt;:
Line &lt;SPAN class="ansi-blue-fg"&gt;652&lt;/SPAN&gt;:   _data = &lt;SPAN class="ansi-cyan-fg"&gt;self&lt;/SPAN&gt;._create_and_register_site(new_item, subdomain, site.definition, content_group_id, collab_group_id)

File &lt;SPAN class="ansi-blue-fg"&gt;c:\python_clone_env\arcgispro-py3_additional\src\arcgishub\arcgishub\sites.py&lt;/SPAN&gt;, in &lt;SPAN class="ansi-green-fg"&gt;_create_and_register_site&lt;/SPAN&gt;:
Line &lt;SPAN class="ansi-blue-fg"&gt;340&lt;/SPAN&gt;:   client_key = _app_dict[&lt;SPAN class="ansi-yellow-fg"&gt;'&lt;/SPAN&gt;&lt;SPAN class="ansi-yellow-fg"&gt;client_id&lt;/SPAN&gt;&lt;SPAN class="ansi-yellow-fg"&gt;'&lt;/SPAN&gt;]

&lt;SPAN class="ansi-red-fg"&gt;TypeError&lt;/SPAN&gt;: 'NoneType' object is not subscriptable&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;Has anybody got any ideas ?&amp;nbsp; have I made incorrect assumptions with cloning from instance to instance on AGOL?&amp;nbsp; Have I missed a step ?&amp;nbsp; &amp;nbsp;Everything is Public on the origin instance .&amp;nbsp; Do I have any other options for cloning content between organisations?&lt;/P&gt;&lt;P&gt;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!...&amp;nbsp; &amp;nbsp;&lt;/P&gt;&lt;P&gt;Paulg&lt;/P&gt;</description>
    <pubDate>Tue, 02 Feb 2021 12:41:39 GMT</pubDate>
    <dc:creator>Department_of_Communications__</dc:creator>
    <dc:date>2021-02-02T12:41:39Z</dc:date>
    <item>
      <title>ArcgisHub Python Api for Sites</title>
      <link>https://community.esri.com/t5/arcgis-hub-questions/arcgishub-python-api-for-sites/m-p/1022495#M4183</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;I'm using the modules and notebooks from&amp;nbsp;&lt;A href="https://www.esri.com/arcgis-blog/products/arcgis-hub/announcements/introducing-arcgis-hub-python-api-for-sites/" target="_blank" rel="noopener"&gt;https://www.esri.com/arcgis-blog/products/arcgis-hub/announcements/introducing-arcgis-hub-python-api-for-sites/&lt;/A&gt;&amp;nbsp;and I'm running into difficulties.&amp;nbsp; The issue I'm experiencing appears to be listed as a bug on the Github site, howerver I'm not fully sure.&lt;/P&gt;&lt;P&gt;I have 2 AGOL organisations and I wan to clone the initiative/site from one or to another using the sample&amp;nbsp;@&amp;nbsp;&lt;A href="https://github.com/Esri/hub-py/tree/master/examples/For%20arcgishub%20library" target="_blank" rel="noopener"&gt;https://github.com/Esri/hub-py/tree/master/examples/For%20arcgishub%20library&lt;/A&gt;&amp;nbsp;cloning and initiative from another org.&amp;nbsp; &amp;nbsp; I follow the sample and all works until the last piece - the actual cloning ! it errors with&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;SPAN class="ansi-red-fg"&gt;TypeError&lt;/SPAN&gt;: 'NoneType' object is not subscriptable&lt;/PRE&gt;&lt;P&gt;It actually clones the objectto my secondary agol instance but no content shows up and I dont have access to the site&amp;nbsp; - it says I don't have permission - and I'm the owner...&amp;nbsp;&lt;/P&gt;&lt;P&gt;The traceback is&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;SPAN class="ansi-red-fg"&gt;TypeError&lt;/SPAN&gt;                                 Traceback (most recent call last)
In  &lt;SPAN class="ansi-blue-fg"&gt;[164]&lt;/SPAN&gt;:
Line &lt;SPAN class="ansi-blue-fg"&gt;1&lt;/SPAN&gt;:     site = hub_basic.initiatives.clone(i1, origin_hub=myHub)

File &lt;SPAN class="ansi-blue-fg"&gt;c:\python_clone_env\arcgispro-py3_additional\src\arcgishub\arcgishub\hub.py&lt;/SPAN&gt;, in &lt;SPAN class="ansi-green-fg"&gt;clone&lt;/SPAN&gt;:
Line &lt;SPAN class="ansi-blue-fg"&gt;558&lt;/SPAN&gt;:   new_site = &lt;SPAN class="ansi-cyan-fg"&gt;self&lt;/SPAN&gt;._hub.sites.clone(site, pages=&lt;SPAN class="ansi-blue-fg"&gt;True&lt;/SPAN&gt;, title=title)

File &lt;SPAN class="ansi-blue-fg"&gt;c:\python_clone_env\arcgispro-py3_additional\src\arcgishub\arcgishub\sites.py&lt;/SPAN&gt;, in &lt;SPAN class="ansi-green-fg"&gt;clone&lt;/SPAN&gt;:
Line &lt;SPAN class="ansi-blue-fg"&gt;652&lt;/SPAN&gt;:   _data = &lt;SPAN class="ansi-cyan-fg"&gt;self&lt;/SPAN&gt;._create_and_register_site(new_item, subdomain, site.definition, content_group_id, collab_group_id)

File &lt;SPAN class="ansi-blue-fg"&gt;c:\python_clone_env\arcgispro-py3_additional\src\arcgishub\arcgishub\sites.py&lt;/SPAN&gt;, in &lt;SPAN class="ansi-green-fg"&gt;_create_and_register_site&lt;/SPAN&gt;:
Line &lt;SPAN class="ansi-blue-fg"&gt;340&lt;/SPAN&gt;:   client_key = _app_dict[&lt;SPAN class="ansi-yellow-fg"&gt;'&lt;/SPAN&gt;&lt;SPAN class="ansi-yellow-fg"&gt;client_id&lt;/SPAN&gt;&lt;SPAN class="ansi-yellow-fg"&gt;'&lt;/SPAN&gt;]

&lt;SPAN class="ansi-red-fg"&gt;TypeError&lt;/SPAN&gt;: 'NoneType' object is not subscriptable&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;Has anybody got any ideas ?&amp;nbsp; have I made incorrect assumptions with cloning from instance to instance on AGOL?&amp;nbsp; Have I missed a step ?&amp;nbsp; &amp;nbsp;Everything is Public on the origin instance .&amp;nbsp; Do I have any other options for cloning content between organisations?&lt;/P&gt;&lt;P&gt;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!...&amp;nbsp; &amp;nbsp;&lt;/P&gt;&lt;P&gt;Paulg&lt;/P&gt;</description>
      <pubDate>Tue, 02 Feb 2021 12:41:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-hub-questions/arcgishub-python-api-for-sites/m-p/1022495#M4183</guid>
      <dc:creator>Department_of_Communications__</dc:creator>
      <dc:date>2021-02-02T12:41:39Z</dc:date>
    </item>
    <item>
      <title>Re: ArcgisHub Python Api for Sites</title>
      <link>https://community.esri.com/t5/arcgis-hub-questions/arcgishub-python-api-for-sites/m-p/1022783#M4185</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I just cloned an initiative in another organization and I noticed that it works fine.&lt;/P&gt;&lt;P&gt;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, &lt;A href="https://github.com/Esri/hub-py" target="_blank" rel="nofollow noopener noreferrer"&gt;https://github.com/Esri/hub-py&lt;/A&gt; do you mind sending me the initiative id of the initiative you are trying to clone? I will inspect it further.&lt;/P&gt;&lt;P&gt;~Manushi.&lt;/P&gt;</description>
      <pubDate>Tue, 02 Feb 2021 21:59:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-hub-questions/arcgishub-python-api-for-sites/m-p/1022783#M4185</guid>
      <dc:creator>ManushiMajumdar</dc:creator>
      <dc:date>2021-02-02T21:59:39Z</dc:date>
    </item>
    <item>
      <title>Re: ArcgisHub Python Api for Sites</title>
      <link>https://community.esri.com/t5/arcgis-hub-questions/arcgishub-python-api-for-sites/m-p/1044978#M4291</link>
      <description>&lt;P&gt;Hi there,&lt;/P&gt;&lt;P&gt;I have exactly the same issue than &lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/113855"&gt;@Department_of_Communications__&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could you finally solve it? How?&lt;/P&gt;&lt;P&gt;Thanks a lot!&lt;/P&gt;&lt;P&gt;Alba&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 08 Apr 2021 11:06:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-hub-questions/arcgishub-python-api-for-sites/m-p/1044978#M4291</guid>
      <dc:creator>Alba_Page</dc:creator>
      <dc:date>2021-04-08T11:06:08Z</dc:date>
    </item>
    <item>
      <title>Re: ArcgisHub Python Api for Sites</title>
      <link>https://community.esri.com/t5/arcgis-hub-questions/arcgishub-python-api-for-sites/m-p/1045144#M4297</link>
      <description>&lt;P&gt;Hi Alba,&lt;/P&gt;&lt;P&gt;Do you mind confirming for me the version of ArcGIS API for Python (arcgis) that you are using?&lt;/P&gt;</description>
      <pubDate>Thu, 08 Apr 2021 17:03:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-hub-questions/arcgishub-python-api-for-sites/m-p/1045144#M4297</guid>
      <dc:creator>ManushiMajumdar</dc:creator>
      <dc:date>2021-04-08T17:03:50Z</dc:date>
    </item>
    <item>
      <title>Re: ArcgisHub Python Api for Sites</title>
      <link>https://community.esri.com/t5/arcgis-hub-questions/arcgishub-python-api-for-sites/m-p/1048989#M4325</link>
      <description>&lt;P&gt;Hi Manushi,&lt;/P&gt;&lt;P&gt;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).&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2021-04-09_08h10_14.png" style="width: 553px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/11294i41ADA8D119853659/image-dimensions/553x307?v=v2" width="553" height="307" role="button" title="2021-04-09_08h10_14.png" alt="2021-04-09_08h10_14.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;But if I check it on the command window it seems to be 1.8.4 version.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2021-04-09_08h11_57.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/11295iB08B0471A7B52F44/image-size/medium?v=v2&amp;amp;px=400" role="button" title="2021-04-09_08h11_57.png" alt="2021-04-09_08h11_57.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;So I don't really know which one is working......&lt;/P&gt;&lt;P&gt;Thanks a lot!!&lt;/P&gt;&lt;P&gt;Alba&lt;/P&gt;</description>
      <pubDate>Tue, 20 Apr 2021 06:14:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-hub-questions/arcgishub-python-api-for-sites/m-p/1048989#M4325</guid>
      <dc:creator>Alba_Page</dc:creator>
      <dc:date>2021-04-20T06:14:50Z</dc:date>
    </item>
    <item>
      <title>Re: ArcgisHub Python Api for Sites</title>
      <link>https://community.esri.com/t5/arcgis-hub-questions/arcgishub-python-api-for-sites/m-p/1051190#M4340</link>
      <description>&lt;P&gt;In general, the error means that you attempted to index an object that doesn't have that functionality. You are trying to subscript an object which you think is a list or dict, but actually is None. This means that you tried to do:&lt;BR /&gt;&lt;BR /&gt;None[something]&lt;/P&gt;&lt;P&gt;NoneType is the type of the None object which represents a lack of value, for example, list1 = list.sort(list1) : - here, you are setting it to None. None always has no data, so &lt;A href="http://net-informations.com/python/err/nonetype.htm" target="_self"&gt;NoneType object is not subscriptable&lt;/A&gt;. In order to correct this error this should be list1.sort().&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 26 Apr 2021 05:23:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-hub-questions/arcgishub-python-api-for-sites/m-p/1051190#M4340</guid>
      <dc:creator>sambutle</dc:creator>
      <dc:date>2021-04-26T05:23:07Z</dc:date>
    </item>
    <item>
      <title>Re: ArcgisHub Python Api for Sites</title>
      <link>https://community.esri.com/t5/arcgis-hub-questions/arcgishub-python-api-for-sites/m-p/1062238#M4471</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/478159"&gt;@sambutle&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks a lot for your answer. However I not able to fix the error, I don't know&amp;nbsp; how to avoid this NoneType.&lt;/P&gt;&lt;P&gt;Could you please explain yourself a little bit more??&amp;nbsp; &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot in advance!&lt;/P&gt;&lt;P&gt;Alba&lt;/P&gt;</description>
      <pubDate>Thu, 27 May 2021 11:04:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-hub-questions/arcgishub-python-api-for-sites/m-p/1062238#M4471</guid>
      <dc:creator>Alba_Page</dc:creator>
      <dc:date>2021-05-27T11:04:23Z</dc:date>
    </item>
  </channel>
</rss>

