Select to view content in your preferred language

Python 3.10.12: Exception: Unable to generate oauth token

425
1
01-14-2024 03:53 AM
Stefan
by
New Contributor

Good afternoon everyone,

I have a script running on Windows on the python version provided with ArcGIS Pro. But if I try to use the same script on my Ubuntu machine, it fails to authenticate while it creates the GIS connection:

Command in the script:

import arcgis
gis = arcgis.GIS(username= 'xx.xxx', password= 'xxxxxxxxxxxxxxxxxxx')

Error message I get:

Traceback (most recent call last):
File "/root/.local/share/virtualenvs/root-BuDEOXnJ/lib/python3.10/site-packages/arcgis/auth/_auth/_token.py", line 841, in token
self._init_response_type_token()
File "/root/.local/share/virtualenvs/root-BuDEOXnJ/lib/python3.10/site-packages/arcgis/auth/_auth/_token.py", line 540, in _init_response_type_token
raise Exception("Unable to generate oauth token")
Exception: Unable to generate oauth token

Python Version on Windows:

Python 3.9.18 [MSC v.1931 64 bit (AMD64)] :: Anaconda, Inc. on win32

Python Version on Ubuntu:

Python 3.10.12 (main, Nov 20 2023, 15:14:05) [GCC 11.4.0] on linux

Any ideas?

Thanks,
Stefan

 

 

 

0 Kudos
1 Reply
Stefan
by
New Contributor

Just to add, no proxy, firewall or anything in between.

0 Kudos