Hi guys,
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?
The credentials should still be active. I haven't changed them since the last time I used this script.
gis = GIS(url=r"https://xyz.maps.arcgis.com/", username="xyz", password="xyz")
I get this error:
---------------------------------------------------------------------------
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":
--> 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.
--> 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 """
--> 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
--> 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:
--> 351 raise ValueError("Mismatching or missing state in params.")
...
-> 1515 raise Exception("A general error occurred: %s" % e)
1516 except:
1517 import traceback
Exception: A general error occurred: list index out of range