<?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 Unable to connect to ArcGIS Enterprise Portal via python in ArcGIS API for Python Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-python-questions/unable-to-connect-to-arcgis-enterprise-portal-via/m-p/1001570#M5200</link>
    <description>&lt;P&gt;Hello all,&lt;/P&gt;&lt;P&gt;I am trying to make a connection to our secured Portal using the following code of ArcGIS API for Python:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;from arcgis.gis import GIS
gis = GIS(portal, user, password)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I use ArcGIS Pro 2.4.2 with Python 3.6.8. The authentication schemes used with our portal is the &lt;A href="https://developers.arcgis.com/python/guide/working-with-different-authentication-schemes/#Built-in-users" target="_self"&gt;Built-in users&lt;/A&gt;&lt;BR /&gt;I succeed in connecting to arcgis online.&lt;/P&gt;&lt;P&gt;Following the error message :&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;Traceback (most recent call last):&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;File "&amp;lt;string&amp;gt;", line 1, in &amp;lt;module&amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\arcgis\gis\__init__.py", line 334, in __init__&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;raise e&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\arcgis\gis\__init__.py", line 322, in __init__&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;referer=self._referer)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\arcgis\_impl\portalpy.py", line 163, in __init__&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;client_id=client_id)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\arcgis\_impl\connection.py", line 308, in __init__&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;self.login(username, password, expiration, client_id)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\arcgis\_impl\connection.py", line 554, in login&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;resp = self.post('', { 'f': 'json' }, add_token=False) # probe portal to find auth scheme&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\arcgis\_impl\connection.py", line 1125, in post&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;resp = opener.open(url, data=encoded_postdata.encode())&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\urllib\request.py", line 532, in open&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;response = meth(req, response)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\urllib\request.py", line 642, in http_response&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;'http', request, response, code, msg, hdrs)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\urllib\request.py", line 570, in error&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;return self._call_chain(*args)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\urllib\request.py", line 504, in _call_chain&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;result = func(*args)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\urllib\request.py", line 650, in http_error_default&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;raise HTTPError(req.full_url, code, msg, hdrs, fp)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;urllib.error.HTTPError: HTTP Error 503: Service Unavailable&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;Thank you for your help,&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;Amélie&lt;/FONT&gt;&lt;/P&gt;</description>
    <pubDate>Sun, 15 Nov 2020 11:19:40 GMT</pubDate>
    <dc:creator>MOLLEAmélie</dc:creator>
    <dc:date>2020-11-15T11:19:40Z</dc:date>
    <item>
      <title>Unable to connect to ArcGIS Enterprise Portal via python</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/unable-to-connect-to-arcgis-enterprise-portal-via/m-p/1001570#M5200</link>
      <description>&lt;P&gt;Hello all,&lt;/P&gt;&lt;P&gt;I am trying to make a connection to our secured Portal using the following code of ArcGIS API for Python:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;from arcgis.gis import GIS
gis = GIS(portal, user, password)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I use ArcGIS Pro 2.4.2 with Python 3.6.8. The authentication schemes used with our portal is the &lt;A href="https://developers.arcgis.com/python/guide/working-with-different-authentication-schemes/#Built-in-users" target="_self"&gt;Built-in users&lt;/A&gt;&lt;BR /&gt;I succeed in connecting to arcgis online.&lt;/P&gt;&lt;P&gt;Following the error message :&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;Traceback (most recent call last):&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;File "&amp;lt;string&amp;gt;", line 1, in &amp;lt;module&amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\arcgis\gis\__init__.py", line 334, in __init__&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;raise e&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\arcgis\gis\__init__.py", line 322, in __init__&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;referer=self._referer)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\arcgis\_impl\portalpy.py", line 163, in __init__&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;client_id=client_id)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\arcgis\_impl\connection.py", line 308, in __init__&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;self.login(username, password, expiration, client_id)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\arcgis\_impl\connection.py", line 554, in login&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;resp = self.post('', { 'f': 'json' }, add_token=False) # probe portal to find auth scheme&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\arcgis\_impl\connection.py", line 1125, in post&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;resp = opener.open(url, data=encoded_postdata.encode())&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\urllib\request.py", line 532, in open&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;response = meth(req, response)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\urllib\request.py", line 642, in http_response&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;'http', request, response, code, msg, hdrs)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\urllib\request.py", line 570, in error&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;return self._call_chain(*args)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\urllib\request.py", line 504, in _call_chain&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;result = func(*args)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\urllib\request.py", line 650, in http_error_default&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;raise HTTPError(req.full_url, code, msg, hdrs, fp)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;urllib.error.HTTPError: HTTP Error 503: Service Unavailable&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;Thank you for your help,&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;Amélie&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 15 Nov 2020 11:19:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/unable-to-connect-to-arcgis-enterprise-portal-via/m-p/1001570#M5200</guid>
      <dc:creator>MOLLEAmélie</dc:creator>
      <dc:date>2020-11-15T11:19:40Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to connect to ArcGIS Enterprise Portal via python</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/unable-to-connect-to-arcgis-enterprise-portal-via/m-p/1001571#M5201</link>
      <description>&lt;P&gt;Looks like your URL could be wrong.&lt;/P&gt;&lt;P&gt;Something like&lt;/P&gt;&lt;P&gt;portal = r"&lt;A href="https://dave.geo.com/portal/home" target="_blank"&gt;https://dave.geo.com/portal/home&lt;/A&gt;"&lt;/P&gt;</description>
      <pubDate>Sun, 15 Nov 2020 11:34:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/unable-to-connect-to-arcgis-enterprise-portal-via/m-p/1001571#M5201</guid>
      <dc:creator>DavidPike</dc:creator>
      <dc:date>2020-11-15T11:34:45Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to connect to ArcGIS Enterprise Portal via python</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/unable-to-connect-to-arcgis-enterprise-portal-via/m-p/1001573#M5202</link>
      <description>&lt;P&gt;Thanks for your answer. I tried to use your solution and same error... Could this be a certificate problem ? Our portal is installed on a very secured network.&lt;/P&gt;&lt;P&gt;Or maybe a conflict with another application ? ( I recently installed QGIS 3)&lt;BR /&gt;This worked as expected with a previous version of ArcGIS pro (but without any QGIS installed)&lt;/P&gt;&lt;P&gt;Amélie&lt;/P&gt;</description>
      <pubDate>Sun, 15 Nov 2020 11:56:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/unable-to-connect-to-arcgis-enterprise-portal-via/m-p/1001573#M5202</guid>
      <dc:creator>MOLLEAmélie</dc:creator>
      <dc:date>2020-11-15T11:56:14Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to connect to ArcGIS Enterprise Portal via python</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/unable-to-connect-to-arcgis-enterprise-portal-via/m-p/1001582#M5203</link>
      <description>&lt;P&gt;It is highly unlikely that having QGIS and Pro on the same machine makes a difference.&lt;/P&gt;&lt;P&gt;HTTP 503 errors usually indicate something is going on with the server and not the client.&amp;nbsp; Since you have done this in the past and it worked, it may be something is partially broken with your on-premises Portal.&amp;nbsp; I would contact the group that manages it.&lt;/P&gt;</description>
      <pubDate>Sun, 15 Nov 2020 15:57:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/unable-to-connect-to-arcgis-enterprise-portal-via/m-p/1001582#M5203</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2020-11-15T15:57:14Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to connect to ArcGIS Enterprise Portal via python</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/unable-to-connect-to-arcgis-enterprise-portal-via/m-p/1001584#M5204</link>
      <description>&lt;P&gt;Thanks for your answer.&lt;BR /&gt;The weird thing is that logging in to our portal using ArcGIS Pro works as expected. I managed to publish and update the hosted feature layers without any issues. Likewise, I manage to use the rest API with Firefox.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 15 Nov 2020 16:20:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/unable-to-connect-to-arcgis-enterprise-portal-via/m-p/1001584#M5204</guid>
      <dc:creator>MOLLEAmélie</dc:creator>
      <dc:date>2020-11-15T16:20:56Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to connect to ArcGIS Enterprise Portal via python</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/unable-to-connect-to-arcgis-enterprise-portal-via/m-p/1001585#M5205</link>
      <description>&lt;P&gt;There's some certificate/PKI stuff you can specify also in GIS(..&lt;/P&gt;&lt;P&gt;&lt;A href="https://developers.arcgis.com/python/api-reference/arcgis.gis.toc.html#gis" target="_blank"&gt;https://developers.arcgis.com/python/api-reference/arcgis.gis.toc.html#gis&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;but well out of my depth there, good luck!&lt;/P&gt;</description>
      <pubDate>Sun, 15 Nov 2020 17:28:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/unable-to-connect-to-arcgis-enterprise-portal-via/m-p/1001585#M5205</guid>
      <dc:creator>DavidPike</dc:creator>
      <dc:date>2020-11-15T17:28:12Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to connect to ArcGIS Enterprise Portal via python</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/unable-to-connect-to-arcgis-enterprise-portal-via/m-p/1001586#M5206</link>
      <description>&lt;P&gt;Thanks David for your help but I have already tested this solution without any success &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 16 Nov 2020 17:55:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/unable-to-connect-to-arcgis-enterprise-portal-via/m-p/1001586#M5206</guid>
      <dc:creator>MOLLEAmélie</dc:creator>
      <dc:date>2020-11-16T17:55:00Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to connect to ArcGIS Enterprise Portal via python</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/unable-to-connect-to-arcgis-enterprise-portal-via/m-p/1024143#M5509</link>
      <description>&lt;P&gt;Didn't find a solution yet but this seems to work as expected with the previous version of arcgis pro python library. I'am waiting for the next version.&lt;/P&gt;</description>
      <pubDate>Sat, 06 Feb 2021 17:15:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/unable-to-connect-to-arcgis-enterprise-portal-via/m-p/1024143#M5509</guid>
      <dc:creator>MOLLEAmélie</dc:creator>
      <dc:date>2021-02-06T17:15:58Z</dc:date>
    </item>
  </channel>
</rss>

