<?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: A general error occurred when authenticating to ArcGIS via Python using username/password in ArcGIS API for Python Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-python-questions/a-general-error-occurred-when-authenticating-to/m-p/1349070#M9286</link>
    <description>&lt;P&gt;Just an update.&lt;/P&gt;&lt;P&gt;API started working again after I changed my password due to an expired password. That might have had something to do with this error since my password was expired but my old password was still "valid" in some way because I did not set a new password at the time.&lt;/P&gt;</description>
    <pubDate>Tue, 14 Nov 2023 06:37:40 GMT</pubDate>
    <dc:creator>PanjiBrotoisworo2</dc:creator>
    <dc:date>2023-11-14T06:37:40Z</dc:date>
    <item>
      <title>A general error occurred when authenticating to ArcGIS via Python using username/password</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/a-general-error-occurred-when-authenticating-to/m-p/1348146#M9271</link>
      <description>&lt;P&gt;Hi guys,&lt;/P&gt;&lt;P&gt;I'm starting to encounter this error all of a sudden when trying to authenticate to ArcGIS Online using my username and password. This has worked before in other instances but all of a sudden it started raising this cryptic error. Does anyone have any ideas on what's going on?&lt;/P&gt;&lt;P&gt;The credentials should still be active. I haven't changed them since the last time I used this script.&lt;/P&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;gis = GIS(url=r"https://xxxx.maps.arcgis.com/", username="xxxx", password="xxxx")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&amp;nbsp;I get this error:&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
d:\conda_envs\arcgis\lib\site-packages\arcgis\auth\_auth\_token.py in token(self)
840 if self._response_type == "token":
--&amp;gt; 841 self._init_response_type_token()
842 else:

d:\conda_envs\arcgis\lib\site-packages\arcgis\auth\_auth\_token.py in _init_response_type_token(self)
581 # Now we extract the token from the URL to make use of it.
--&amp;gt; 582 self._auth_token = session.token_from_fragment(callback_url)
583 if "expires_at" in self._auth_token:

d:\conda_envs\arcgis\lib\site-packages\requests_oauthlib\oauth2_session.py in token_from_fragment(self, authorization_response)
370 """
--&amp;gt; 371 self._client.parse_request_uri_response(
372 authorization_response, state=self._state

d:\conda_envs\arcgis\lib\site-packages\oauthlib\oauth2\rfc6749\clients\mobile_application.py in parse_request_uri_response(self, uri, state, scope)
171 scope = self.scope if scope is None else scope
--&amp;gt; 172 self.token = parse_implicit_response(uri, state=state, scope=scope)
173 self.populate_token_attributes(self.token)

d:\conda_envs\arcgis\lib\site-packages\oauthlib\oauth2\rfc6749\parameters.py in parse_implicit_response(uri, state, scope)
350 if state and params.get('state', None) != state:
--&amp;gt; 351 raise ValueError("Mismatching or missing state in params.")
...
-&amp;gt; 1515 raise Exception("A general error occurred: %s" % e)
1516 except:
1517 import traceback

Exception: A general error occurred: list index out of range&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 10 Nov 2023 08:50:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/a-general-error-occurred-when-authenticating-to/m-p/1348146#M9271</guid>
      <dc:creator>PanjiBrotoisworo2</dc:creator>
      <dc:date>2023-11-10T08:50:25Z</dc:date>
    </item>
    <item>
      <title>Re: A general error occurred when authenticating to ArcGIS via Python using username/password</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/a-general-error-occurred-when-authenticating-to/m-p/1349070#M9286</link>
      <description>&lt;P&gt;Just an update.&lt;/P&gt;&lt;P&gt;API started working again after I changed my password due to an expired password. That might have had something to do with this error since my password was expired but my old password was still "valid" in some way because I did not set a new password at the time.&lt;/P&gt;</description>
      <pubDate>Tue, 14 Nov 2023 06:37:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/a-general-error-occurred-when-authenticating-to/m-p/1349070#M9286</guid>
      <dc:creator>PanjiBrotoisworo2</dc:creator>
      <dc:date>2023-11-14T06:37:40Z</dc:date>
    </item>
  </channel>
</rss>

