<?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 Re: GIS module does not access ArcGIS Hub in ArcGIS API for Python Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-python-questions/gis-module-does-not-access-arcgis-hub/m-p/1222199#M7906</link>
    <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/294090"&gt;@JaredPilbeam2&lt;/a&gt;you are running into an error because you are signing into your Hub site. You need to sign into your Hub organization (as you have shown in the first code snippet) and then access your sites using the &lt;A href="https://developers.arcgis.com/python/api-reference/arcgis.apps.hub.html#arcgis.apps.hub.Hub" target="_self"&gt;gis.hub&lt;/A&gt; submodule of the ArcGIS API for Python.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Alternatively, you can also use Hub's Python API &lt;A href="https://github.com/Esri/hub-py/" target="_blank"&gt;https://github.com/Esri/hub-py/&lt;/A&gt; but you will still need to sign into your Hub (org) and then fetch the particular site you wish to work with.&lt;/P&gt;</description>
    <pubDate>Fri, 14 Oct 2022 19:53:34 GMT</pubDate>
    <dc:creator>ManushiMajumdar</dc:creator>
    <dc:date>2022-10-14T19:53:34Z</dc:date>
    <item>
      <title>GIS module does not access ArcGIS Hub</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/gis-module-does-not-access-arcgis-hub/m-p/1221593#M7889</link>
      <description>&lt;P&gt;I can use the GIS module on our organization's Community Hub site.&lt;/P&gt;&lt;LI-CODE lang="python"&gt;rom arcgis.gis import GIS
gis = GIS("https://willcounty.maps.arcgis.com/", "user", "password")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;But, I can't on ArcGIS Hub. This attempt is from an anaconda environment. I also tried from an Pro environment and got same error.&lt;/P&gt;&lt;LI-CODE lang="python"&gt;from arcgis.gis import GIS
gis = GIS("https://willcountygis.hub.arcgis.com/", "username", "password")

#Error:
---------------------------------------------------------------------------
JSONDecodeError                           Traceback (most recent call last)
&amp;lt;ipython-input-5-0190cb412727&amp;gt; in &amp;lt;module&amp;gt;
      1 from arcgis.gis import GIS
----&amp;gt; 2 gis = GIS("https://willcountygis.hub.arcgis.com/", "username", "password")

c:\ProgramData\Anaconda3\envs\py37\lib\site-packages\arcgis\gis\__init__.py in __init__(self, url, username, password, key_file, cert_file, verify_cert, set_active, client_id, profile, **kwargs)
    481                 )
    482             else:
--&amp;gt; 483                 raise e
    484         try:
    485             if (

c:\ProgramData\Anaconda3\envs\py37\lib\site-packages\arcgis\gis\__init__.py in __init__(self, url, username, password, key_file, cert_file, verify_cert, set_active, client_id, profile, **kwargs)
    442                 trust_env=kwargs.get("trust_env", None),
    443                 timeout=self._timeout,
--&amp;gt; 444                 proxy=kwargs.get("proxy", None),
    445             )
    446             if self._portal.is_kubernetes:

c:\ProgramData\Anaconda3\envs\py37\lib\site-packages\arcgis\gis\_impl\_portalpy.py in __init__(self, url, username, password, key_file, cert_file, expiration, referer, proxy_host, proxy_port, connection, workdir, tokenurl, verify_cert, client_id, custom_auth, token, **kwargs)
    203                 )
    204         # self.get_version(True)
--&amp;gt; 205         self.get_properties(True)
    206 
    207     def add_group_users(self, user_names, group_id, admin_names):

c:\ProgramData\Anaconda3\envs\py37\lib\site-packages\arcgis\gis\_impl\_portalpy.py in get_properties(self, force)
   1225                     )  # issue seen with key, cert auth
   1226                 if not resp:
-&amp;gt; 1227                     raise e
   1228 
   1229             if resp:

c:\ProgramData\Anaconda3\envs\py37\lib\site-packages\arcgis\gis\_impl\_portalpy.py in get_properties(self, force)
   1205             resp = None
   1206             try:
-&amp;gt; 1207                 resp = self.con.post(path, self._postdata(), ssl=True)
   1208             except Exception as e:
   1209                 if (

c:\ProgramData\Anaconda3\envs\py37\lib\site-packages\arcgis\gis\_impl\_con\_connection.py in post(self, path, params, files, **kwargs)
    964                     params.pop("token", None)
    965                     # pass
--&amp;gt; 966             elif token_as_header == False and self.token is not None:  # as ?token=
...
    354         except StopIteration as err:
--&amp;gt; 355             raise JSONDecodeError("Expecting value", s, err.value) from None
    356         return obj, end

JSONDecodeError: Expecting value: line 1 column 1 (char 0)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;According to the &lt;A href="https://developers.arcgis.com/python/guide/the-gis-module/" target="_self"&gt;GIS Module help docs&lt;/A&gt; it doesn't look like you can access Hub. Is there any other way?&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;&lt;A href="https://developers.arcgis.com/python/guide/using-the-gis/" target="_blank"&gt;&lt;STRONG&gt;GIS&lt;/STRONG&gt;&lt;/A&gt; : represents the GIS, either ArcGIS Online or an ArcGIS Portal&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 13 Oct 2022 15:25:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/gis-module-does-not-access-arcgis-hub/m-p/1221593#M7889</guid>
      <dc:creator>JaredPilbeam2</dc:creator>
      <dc:date>2022-10-13T15:25:17Z</dc:date>
    </item>
    <item>
      <title>Re: GIS module does not access ArcGIS Hub</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/gis-module-does-not-access-arcgis-hub/m-p/1221610#M7890</link>
      <description>&lt;P&gt;I also cannot access the&amp;nbsp;&lt;SPAN&gt;ArcGIS Hub. Maybe its a glitch. Hopefully, it will &lt;A href="https://whiteroseshub.com/blue-and-white-roses-meaning/" target="_self"&gt;get right&lt;/A&gt; soon.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 13 Oct 2022 15:49:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/gis-module-does-not-access-arcgis-hub/m-p/1221610#M7890</guid>
      <dc:creator>BrodyNienow</dc:creator>
      <dc:date>2022-10-13T15:49:45Z</dc:date>
    </item>
    <item>
      <title>Re: GIS module does not access ArcGIS Hub</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/gis-module-does-not-access-arcgis-hub/m-p/1221636#M7892</link>
      <description>&lt;P&gt;The web page for hub.arcgis.com has no meaning to me, it says it will "allow people ... to accomplish ... goals"&lt;/P&gt;&lt;P&gt;Hard to get excited enough to try logging in.&lt;/P&gt;</description>
      <pubDate>Thu, 13 Oct 2022 16:27:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/gis-module-does-not-access-arcgis-hub/m-p/1221636#M7892</guid>
      <dc:creator>Brian_Wilson</dc:creator>
      <dc:date>2022-10-13T16:27:22Z</dc:date>
    </item>
    <item>
      <title>Re: GIS module does not access ArcGIS Hub</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/gis-module-does-not-access-arcgis-hub/m-p/1221712#M7894</link>
      <description>&lt;P&gt;I tried anyway -- I can log in fine using my AGO credentials in a browser but via arcgis.gis fails for me too.&lt;/P&gt;&lt;P&gt;Is Hub just a different UI for AGO?&lt;/P&gt;</description>
      <pubDate>Thu, 13 Oct 2022 18:50:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/gis-module-does-not-access-arcgis-hub/m-p/1221712#M7894</guid>
      <dc:creator>Brian_Wilson</dc:creator>
      <dc:date>2022-10-13T18:50:39Z</dc:date>
    </item>
    <item>
      <title>Re: GIS module does not access ArcGIS Hub</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/gis-module-does-not-access-arcgis-hub/m-p/1221737#M7895</link>
      <description>&lt;P&gt;No, it's meant to be a more collaborative environment than AGOL. &lt;A href="https://www.esri.com/en-us/arcgis/products/arcgis-hub/overview" target="_blank"&gt;Hub overview&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Thu, 13 Oct 2022 19:23:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/gis-module-does-not-access-arcgis-hub/m-p/1221737#M7895</guid>
      <dc:creator>JaredPilbeam2</dc:creator>
      <dc:date>2022-10-13T19:23:24Z</dc:date>
    </item>
    <item>
      <title>Re: GIS module does not access ArcGIS Hub</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/gis-module-does-not-access-arcgis-hub/m-p/1222095#M7901</link>
      <description>&lt;P&gt;Sorry I was not clear -- the real question is, isn't it just exposing the content in your *.maps.arcgis.com account? So if you want to manipulate your content then you can use the regular AGOL login and its API. If there are very specific things that hub gives you beyond a different UI, then you'd be out of luck.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;STOP READING HERE. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;When I tried Hub I was shown content in my AGOL account, in a different format, shrugged, and moved on because I still had not "transformed my community" and it was already Wednesday.&lt;/P&gt;&lt;P&gt;The Hub Overview is the one I referenced above but thanks, I need more than that. Whoever designed it had no idea what Hub is, so they turned the crank on the hype machine and cranked out content-free sentences like "&lt;SPAN&gt;&lt;EM&gt;With &lt;STRONG&gt;ArcGIS Hub&lt;/STRONG&gt;, organizations can leverage their existing data and technology and work together with internal and external stakeholders to track progress, improve outcomes, and create vibrant communities&lt;/EM&gt;.&lt;/SPAN&gt;"&lt;/P&gt;&lt;P&gt;Excuse me now, I have to go get me some leverage, my community is insufficiently vibrant.&lt;/P&gt;</description>
      <pubDate>Fri, 14 Oct 2022 15:36:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/gis-module-does-not-access-arcgis-hub/m-p/1222095#M7901</guid>
      <dc:creator>Brian_Wilson</dc:creator>
      <dc:date>2022-10-14T15:36:17Z</dc:date>
    </item>
    <item>
      <title>Re: GIS module does not access ArcGIS Hub</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/gis-module-does-not-access-arcgis-hub/m-p/1222199#M7906</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/294090"&gt;@JaredPilbeam2&lt;/a&gt;you are running into an error because you are signing into your Hub site. You need to sign into your Hub organization (as you have shown in the first code snippet) and then access your sites using the &lt;A href="https://developers.arcgis.com/python/api-reference/arcgis.apps.hub.html#arcgis.apps.hub.Hub" target="_self"&gt;gis.hub&lt;/A&gt; submodule of the ArcGIS API for Python.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Alternatively, you can also use Hub's Python API &lt;A href="https://github.com/Esri/hub-py/" target="_blank"&gt;https://github.com/Esri/hub-py/&lt;/A&gt; but you will still need to sign into your Hub (org) and then fetch the particular site you wish to work with.&lt;/P&gt;</description>
      <pubDate>Fri, 14 Oct 2022 19:53:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/gis-module-does-not-access-arcgis-hub/m-p/1222199#M7906</guid>
      <dc:creator>ManushiMajumdar</dc:creator>
      <dc:date>2022-10-14T19:53:34Z</dc:date>
    </item>
    <item>
      <title>Re: GIS module does not access ArcGIS Hub</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/gis-module-does-not-access-arcgis-hub/m-p/1222204#M7907</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/315612"&gt;@ManushiMajumdar&lt;/a&gt; ,&lt;/P&gt;&lt;P&gt;I have no problems accessing sites on our organization's Hub Community using either module here:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;from arcgis.gis import GIS
gis = GIS("https://willcounty.maps.arcgis.com", "adminUsername", "password")
sites = str(gis.content.search(query="", item_type="Site", sort_order="asc"))&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;or&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;from arcgishub import hub
myHub = hub.Hub("https://willcounty.maps.arcgis.com", "adminUsername", "password") # or the url of your ArcGIS Online organization
initiatives = myHub.initiatives.search()&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;They both give me the same sites:&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;[&amp;lt;Initiative title:"Capital Project Tracking" owner:WillCoHub&amp;gt;, &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;lt;Initiative title:"testDelete" owner:jpilbeam_hub&amp;gt;, &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;lt;Initiative title:"DeciPH-ER " owner:WillCoHub&amp;gt;]&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;BLOCKQUOTE&gt;you are running into an error because you are signing into your Hub site.&lt;BR /&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;SPAN&gt;That's what I'm after is our stuff on the Hub site: &lt;A href="https://hub.arcgis.com" target="_blank" rel="noopener"&gt;https://hub.arcgis.com&lt;/A&gt;. Is that possible with the Python API? That's my question. We have 900+ items.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JaredPilbeam2_0-1665778767242.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/53703i939EBB115B72CFE7/image-size/medium?v=v2&amp;amp;px=400" role="button" title="JaredPilbeam2_0-1665778767242.png" alt="JaredPilbeam2_0-1665778767242.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 14 Oct 2022 20:25:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/gis-module-does-not-access-arcgis-hub/m-p/1222204#M7907</guid>
      <dc:creator>JaredPilbeam2</dc:creator>
      <dc:date>2022-10-14T20:25:22Z</dc:date>
    </item>
    <item>
      <title>Re: GIS module does not access ArcGIS Hub</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/gis-module-does-not-access-arcgis-hub/m-p/1222207#M7908</link>
      <description>&lt;P&gt;To access all the items in your Hub (organization), you will need to use the `gis.content` submodule of the ArcGIS API for Python.&lt;/P&gt;</description>
      <pubDate>Fri, 14 Oct 2022 20:26:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/gis-module-does-not-access-arcgis-hub/m-p/1222207#M7908</guid>
      <dc:creator>ManushiMajumdar</dc:creator>
      <dc:date>2022-10-14T20:26:20Z</dc:date>
    </item>
    <item>
      <title>Re: GIS module does not access ArcGIS Hub</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/gis-module-does-not-access-arcgis-hub/m-p/1222213#M7909</link>
      <description>&lt;P&gt;Yes, unless I'm completely missing something I can not access the content on our &lt;SPAN&gt;&lt;A href="https://hub.arcgis.com" target="_blank" rel="noopener nofollow noreferrer"&gt;https://hub.arcgis.com&lt;/A&gt;&lt;/SPAN&gt; page using any module or submodule.&lt;/P&gt;</description>
      <pubDate>Fri, 14 Oct 2022 20:44:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/gis-module-does-not-access-arcgis-hub/m-p/1222213#M7909</guid>
      <dc:creator>JaredPilbeam2</dc:creator>
      <dc:date>2022-10-14T20:44:31Z</dc:date>
    </item>
    <item>
      <title>Re: GIS module does not access ArcGIS Hub</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/gis-module-does-not-access-arcgis-hub/m-p/1222214#M7910</link>
      <description>&lt;P&gt;The content in your Hub is hosted within an ArcGIS Organization. &lt;A href="https://developers.arcgis.com/python/guide/managing-your-content/" target="_self"&gt;Here&lt;/A&gt; is an example to access that content using the ArcGIS API for Python.&lt;/P&gt;&lt;P&gt;Hub's submodule within the Python API or Hub's library (arcgishub) can be used specifically for managing your Hub items (initiatives, sites, pages).&lt;/P&gt;</description>
      <pubDate>Fri, 14 Oct 2022 20:50:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/gis-module-does-not-access-arcgis-hub/m-p/1222214#M7910</guid>
      <dc:creator>ManushiMajumdar</dc:creator>
      <dc:date>2022-10-14T20:50:49Z</dc:date>
    </item>
    <item>
      <title>Re: GIS module does not access ArcGIS Hub</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/gis-module-does-not-access-arcgis-hub/m-p/1222227#M7911</link>
      <description>&lt;P&gt;Sorry to keep dragging this out, but I'm pretty sure what you're telling me is what I'm doing.&lt;/P&gt;&lt;P&gt;Ok, let's try another way. Can you access these nine Hub Site Applications listed on &lt;A href="https://hub.arcgis.com" target="_blank"&gt;https://hub.arcgis.com&lt;/A&gt; via the Python API?&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JaredPilbeam2_0-1665783176786.png" style="width: 744px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/53707i04B70BD7329C88D7/image-dimensions/744x489?v=v2" width="744" height="489" role="button" title="JaredPilbeam2_0-1665783176786.png" alt="JaredPilbeam2_0-1665783176786.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 14 Oct 2022 21:34:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/gis-module-does-not-access-arcgis-hub/m-p/1222227#M7911</guid>
      <dc:creator>JaredPilbeam2</dc:creator>
      <dc:date>2022-10-14T21:34:34Z</dc:date>
    </item>
    <item>
      <title>Re: GIS module does not access ArcGIS Hub</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/gis-module-does-not-access-arcgis-hub/m-p/1222228#M7912</link>
      <description>&lt;P&gt;Yes, since they are of type `Hub Site Application` you can also access them using&amp;nbsp; Hub's Python API. Look at the examples in the repository for guides on how to do it. For non Hub item types you can use the Python API.&lt;/P&gt;</description>
      <pubDate>Fri, 14 Oct 2022 21:37:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/gis-module-does-not-access-arcgis-hub/m-p/1222228#M7912</guid>
      <dc:creator>ManushiMajumdar</dc:creator>
      <dc:date>2022-10-14T21:37:46Z</dc:date>
    </item>
  </channel>
</rss>

