Hello,
after upgrading to Pro 3.3, I created a new python clone environment.
After that, I can create a GIS connection in python using arcgis.gis.GIS(**PORTAL)
But, then, I installed untools and it broke the GIS connection.
Now I have this error :
Traceback (most recent call last):
File "***\rebuild.py", line 71, in <module>
portalTigre = arcgis.gis.GIS(**PORTAL)
^^^^^^^^^^^^^^^^^^^^^^^^
File "***\Lib\site-packages\arcgis\gis\__init__.py", line 637, in __init__
raise e
File "***\Lib\site-packages\arcgis\gis\__init__.py", line 576, in __init__
self._portal = _portalpy.Portal(
^^^^^^^^^^^^^^^^^
File "***\Lib\site-packages\arcgis\gis\_impl\_portalpy.py", line 210, in __init__
self.con = Connection(
^^^^^^^^^^^
File "***\Lib\site-packages\arcgis\gis\_impl\_con\_connection.py", line 356, in __init__
self._create_session()
File "***\Lib\site-packages\arcgis\gis\_impl\_con\_connection.py", line 588, in _create_session
if self._check_product() == "SERVER":
^^^^^^^^^^^^^^^^^^^^^
File "***\Lib\site-packages\arcgis\gis\_impl\_con\_connection.py", line 1961, in _check_product
res = self.get(baseurl + "/info", params={"f": "json"})
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "***\Lib\site-packages\arcgis\gis\_impl\_con\_connection.py", line 853, in get
raise Exception("A general error occurred: %s" % e)
Exception: A general error occurred: maximum recursion depth exceeded
More info :
I did it twice with the same result
Any idea ?
Solved! Go to Solution.
The issue is with the requests library. conda updated this package during the installation of untools (despite untools not even using it).
You need requests >=2.30.0,<2.32.0
I was able to reproduce this and confirmed that downgrading to requests 2.31.0 resolved it.
The issue is with the requests library. conda updated this package during the installation of untools (despite untools not even using it).
You need requests >=2.30.0,<2.32.0
I was able to reproduce this and confirmed that downgrading to requests 2.31.0 resolved it.
Thanks Paul,
pip install requests==2.31.0 did resolve the bug.
Weirdly, conda install requests=2.31.0 does nothing...