Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

requests > 2.31 breaks this packages connections to GIS(), causes maximum recursion #1834

Closed
dnsohrabian opened this issue May 22, 2024 · 8 comments
Labels

Comments

@dnsohrabian
Copy link

dnsohrabian commented May 22, 2024

Describe the bug
With requests package >2.31, you cannot instantiate a GIS() object and use the API, with or without credentials. The package allows requests to be up to 3.0. This does not seem true.

To Reproduce
Steps to reproduce the behavior:
With requests package > 2.31

from arcgis import GIS
gis = GIS()

error:

RecursionError                            Traceback (most recent call last)
File ~/.pyenv/versions/3.10.12/envs/opendata_dev_test/lib/python3.10/site-packages/arcgis/gis/_impl/_con/_connection.py:1466, in Connection.post(self, path, params, files, **kwargs)
   [1465](https://vscode-remote+wsl-002bubuntu.vscode-resource.vscode-cdn.net/home/dsohrabian/repos/open-data-examples/~/.pyenv/versions/3.10.12/envs/opendata_dev_test/lib/python3.10/site-packages/arcgis/gis/_impl/_con/_connection.py:1465) if timeout:
-> [1466](https://vscode-remote+wsl-002bubuntu.vscode-resource.vscode-cdn.net/home/dsohrabian/repos/open-data-examples/~/.pyenv/versions/3.10.12/envs/opendata_dev_test/lib/python3.10/site-packages/arcgis/gis/_impl/_con/_connection.py:1466)     resp = self._session.post(
   [1467](https://vscode-remote+wsl-002bubuntu.vscode-resource.vscode-cdn.net/home/dsohrabian/repos/open-data-examples/~/.pyenv/versions/3.10.12/envs/opendata_dev_test/lib/python3.10/site-packages/arcgis/gis/_impl/_con/_connection.py:1467)         url=url,
   [1468](https://vscode-remote+wsl-002bubuntu.vscode-resource.vscode-cdn.net/home/dsohrabian/repos/open-data-examples/~/.pyenv/versions/3.10.12/envs/opendata_dev_test/lib/python3.10/site-packages/arcgis/gis/_impl/_con/_connection.py:1468)         data=params,
   [1469](https://vscode-remote+wsl-002bubuntu.vscode-resource.vscode-cdn.net/home/dsohrabian/repos/open-data-examples/~/.pyenv/versions/3.10.12/envs/opendata_dev_test/lib/python3.10/site-packages/arcgis/gis/_impl/_con/_connection.py:1469)         cert=cert,
   [1470](https://vscode-remote+wsl-002bubuntu.vscode-resource.vscode-cdn.net/home/dsohrabian/repos/open-data-examples/~/.pyenv/versions/3.10.12/envs/opendata_dev_test/lib/python3.10/site-packages/arcgis/gis/_impl/_con/_connection.py:1470)         files=files,
   [1471](https://vscode-remote+wsl-002bubuntu.vscode-resource.vscode-cdn.net/home/dsohrabian/repos/open-data-examples/~/.pyenv/versions/3.10.12/envs/opendata_dev_test/lib/python3.10/site-packages/arcgis/gis/_impl/_con/_connection.py:1471)         timeout=timeout,
   [1472](https://vscode-remote+wsl-002bubuntu.vscode-resource.vscode-cdn.net/home/dsohrabian/repos/open-data-examples/~/.pyenv/versions/3.10.12/envs/opendata_dev_test/lib/python3.10/site-packages/arcgis/gis/_impl/_con/_connection.py:1472)         verify=self._verify_cert,
   [1473](https://vscode-remote+wsl-002bubuntu.vscode-resource.vscode-cdn.net/home/dsohrabian/repos/open-data-examples/~/.pyenv/versions/3.10.12/envs/opendata_dev_test/lib/python3.10/site-packages/arcgis/gis/_impl/_con/_connection.py:1473)         allow_redirects=allow_redirects,
   [1474](https://vscode-remote+wsl-002bubuntu.vscode-resource.vscode-cdn.net/home/dsohrabian/repos/open-data-examples/~/.pyenv/versions/3.10.12/envs/opendata_dev_test/lib/python3.10/site-packages/arcgis/gis/_impl/_con/_connection.py:1474)     )
   [1475](https://vscode-remote+wsl-002bubuntu.vscode-resource.vscode-cdn.net/home/dsohrabian/repos/open-data-examples/~/.pyenv/versions/3.10.12/envs/opendata_dev_test/lib/python3.10/site-packages/arcgis/gis/_impl/_con/_connection.py:1475) else:

File ~/.pyenv/versions/3.10.12/envs/opendata_dev_test/lib/python3.10/site-packages/arcgis/auth/api.py:525, in EsriSession.post(self, url, data, json, **kwargs)
    [524](https://vscode-remote+wsl-002bubuntu.vscode-resource.vscode-cdn.net/home/dsohrabian/repos/open-data-examples/~/.pyenv/versions/3.10.12/envs/opendata_dev_test/lib/python3.10/site-packages/arcgis/auth/api.py:524)     redirects = self.allow_redirects
--> [525](https://vscode-remote+wsl-002bubuntu.vscode-resource.vscode-cdn.net/home/dsohrabian/repos/open-data-examples/~/.pyenv/versions/3.10.12/envs/opendata_dev_test/lib/python3.10/site-packages/arcgis/auth/api.py:525) return self._session.post(
    [526](https://vscode-remote+wsl-002bubuntu.vscode-resource.vscode-cdn.net/home/dsohrabian/repos/open-data-examples/~/.pyenv/versions/3.10.12/envs/opendata_dev_test/lib/python3.10/site-packages/arcgis/auth/api.py:526)     url,
    [527](https://vscode-remote+wsl-002bubuntu.vscode-resource.vscode-cdn.net/home/dsohrabian/repos/open-data-examples/~/.pyenv/versions/3.10.12/envs/opendata_dev_test/lib/python3.10/site-packages/arcgis/auth/api.py:527)     data=data,
    [528](https://vscode-remote+wsl-002bubuntu.vscode-resource.vscode-cdn.net/home/dsohrabian/repos/open-data-examples/~/.pyenv/versions/3.10.12/envs/opendata_dev_test/lib/python3.10/site-packages/arcgis/auth/api.py:528)     json=json,
    [529](https://vscode-remote+wsl-002bubuntu.vscode-resource.vscode-cdn.net/home/dsohrabian/repos/open-data-examples/~/.pyenv/versions/3.10.12/envs/opendata_dev_test/lib/python3.10/site-packages/arcgis/auth/api.py:529)     allow_redirects=redirects,
    [530](https://vscode-remote+wsl-002bubuntu.vscode-resource.vscode-cdn.net/home/dsohrabian/repos/open-data-examples/~/.pyenv/versions/3.10.12/envs/opendata_dev_test/lib/python3.10/site-packages/arcgis/auth/api.py:530)     proxies=proxies,
    [531](https://vscode-remote+wsl-002bubuntu.vscode-resource.vscode-cdn.net/home/dsohrabian/repos/open-data-examples/~/.pyenv/versions/3.10.12/envs/opendata_dev_test/lib/python3.10/site-packages/arcgis/auth/api.py:531)     **kwargs,
    [532](https://vscode-remote+wsl-002bubuntu.vscode-resource.vscode-cdn.net/home/dsohrabian/repos/open-data-examples/~/.pyenv/versions/3.10.12/envs/opendata_dev_test/lib/python3.10/site-packages/arcgis/auth/api.py:532) )

File ~/.pyenv/versions/3.10.12/envs/opendata_dev_test/lib/python3.10/site-packages/requests/sessions.py:637, in Session.post(self, url, data, json, **kwargs)
    [627](https://vscode-remote+wsl-002bubuntu.vscode-resource.vscode-cdn.net/home/dsohrabian/repos/open-data-examples/~/.pyenv/versions/3.10.12/envs/opendata_dev_test/lib/python3.10/site-packages/requests/sessions.py:627) r"""Sends a POST request. Returns :class:`Response` object.
    [628](https://vscode-remote+wsl-002bubuntu.vscode-resource.vscode-cdn.net/home/dsohrabian/repos/open-data-examples/~/.pyenv/versions/3.10.12/envs/opendata_dev_test/lib/python3.10/site-packages/requests/sessions.py:628) 
    [629](https://vscode-remote+wsl-002bubuntu.vscode-resource.vscode-cdn.net/home/dsohrabian/repos/open-data-examples/~/.pyenv/versions/3.10.12/envs/opendata_dev_test/lib/python3.10/site-packages/requests/sessions.py:629) :param url: URL for the new :class:`Request` object.
   (...)
    [634](https://vscode-remote+wsl-002bubuntu.vscode-resource.vscode-cdn.net/home/dsohrabian/repos/open-data-examples/~/.pyenv/versions/3.10.12/envs/opendata_dev_test/lib/python3.10/site-packages/requests/sessions.py:634) :rtype: requests.Response
    [635](https://vscode-remote+wsl-002bubuntu.vscode-resource.vscode-cdn.net/home/dsohrabian/repos/open-data-examples/~/.pyenv/versions/3.10.12/envs/opendata_dev_test/lib/python3.10/site-packages/requests/sessions.py:635) """
--> [637](https://vscode-remote+wsl-002bubuntu.vscode-resource.vscode-cdn.net/home/dsohrabian/repos/open-data-examples/~/.pyenv/versions/3.10.12/envs/opendata_dev_test/lib/python3.10/site-packages/requests/sessions.py:637) return self.request("POST", url, data=data, json=json, **kwargs)

File ~/.pyenv/versions/3.10.12/envs/opendata_dev_test/lib/python3.10/site-packages/requests/sessions.py:589, in Session.request(self, method, url, params, data, headers, cookies, files, auth, timeout, allow_redirects, proxies, hooks, stream, verify, cert, json)
    [588](https://vscode-remote+wsl-002bubuntu.vscode-resource.vscode-cdn.net/home/dsohrabian/repos/open-data-examples/~/.pyenv/versions/3.10.12/envs/opendata_dev_test/lib/python3.10/site-packages/requests/sessions.py:588) send_kwargs.update(settings)
--> [589](https://vscode-remote+wsl-002bubuntu.vscode-resource.vscode-cdn.net/home/dsohrabian/repos/open-data-examples/~/.pyenv/versions/3.10.12/envs/opendata_dev_test/lib/python3.10/site-packages/requests/sessions.py:589) resp = self.send(prep, **send_kwargs)
    [591](https://vscode-remote+wsl-002bubuntu.vscode-resource.vscode-cdn.net/home/dsohrabian/repos/open-data-examples/~/.pyenv/versions/3.10.12/envs/opendata_dev_test/lib/python3.10/site-packages/requests/sessions.py:591) return resp

File ~/.pyenv/versions/3.10.12/envs/opendata_dev_test/lib/python3.10/site-packages/requests/sessions.py:703, in Session.send(self, request, **kwargs)
    [702](https://vscode-remote+wsl-002bubuntu.vscode-resource.vscode-cdn.net/home/dsohrabian/repos/open-data-examples/~/.pyenv/versions/3.10.12/envs/opendata_dev_test/lib/python3.10/site-packages/requests/sessions.py:702) # Send the request
--> [703](https://vscode-remote+wsl-002bubuntu.vscode-resource.vscode-cdn.net/home/dsohrabian/repos/open-data-examples/~/.pyenv/versions/3.10.12/envs/opendata_dev_test/lib/python3.10/site-packages/requests/sessions.py:703) r = adapter.send(request, **kwargs)
    [705](https://vscode-remote+wsl-002bubuntu.vscode-resource.vscode-cdn.net/home/dsohrabian/repos/open-data-examples/~/.pyenv/versions/3.10.12/envs/opendata_dev_test/lib/python3.10/site-packages/requests/sessions.py:705) # Total elapsed time of the request (approximately)

File ~/.pyenv/versions/3.10.12/envs/opendata_dev_test/lib/python3.10/site-packages/requests/adapters.py:589, in HTTPAdapter.send(self, request, stream, timeout, verify, cert, proxies)
    [588](https://vscode-remote+wsl-002bubuntu.vscode-resource.vscode-cdn.net/home/dsohrabian/repos/open-data-examples/~/.pyenv/versions/3.10.12/envs/opendata_dev_test/lib/python3.10/site-packages/requests/adapters.py:588) try:
--> [589](https://vscode-remote+wsl-002bubuntu.vscode-resource.vscode-cdn.net/home/dsohrabian/repos/open-data-examples/~/.pyenv/versions/3.10.12/envs/opendata_dev_test/lib/python3.10/site-packages/requests/adapters.py:589)     resp = conn.urlopen(
    [590](https://vscode-remote+wsl-002bubuntu.vscode-resource.vscode-cdn.net/home/dsohrabian/repos/open-data-examples/~/.pyenv/versions/3.10.12/envs/opendata_dev_test/lib/python3.10/site-packages/requests/adapters.py:590)         method=request.method,
    [591](https://vscode-remote+wsl-002bubuntu.vscode-resource.vscode-cdn.net/home/dsohrabian/repos/open-data-examples/~/.pyenv/versions/3.10.12/envs/opendata_dev_test/lib/python3.10/site-packages/requests/adapters.py:591)         url=url,
    [592](https://vscode-remote+wsl-002bubuntu.vscode-resource.vscode-cdn.net/home/dsohrabian/repos/open-data-examples/~/.pyenv/versions/3.10.12/envs/opendata_dev_test/lib/python3.10/site-packages/requests/adapters.py:592)         body=request.body,
    [593](https://vscode-remote+wsl-002bubuntu.vscode-resource.vscode-cdn.net/home/dsohrabian/repos/open-data-examples/~/.pyenv/versions/3.10.12/envs/opendata_dev_test/lib/python3.10/site-packages/requests/adapters.py:593)         headers=request.headers,
    [594](https://vscode-remote+wsl-002bubuntu.vscode-resource.vscode-cdn.net/home/dsohrabian/repos/open-data-examples/~/.pyenv/versions/3.10.12/envs/opendata_dev_test/lib/python3.10/site-packages/requests/adapters.py:594)         redirect=False,
    [595](https://vscode-remote+wsl-002bubuntu.vscode-resource.vscode-cdn.net/home/dsohrabian/repos/open-data-examples/~/.pyenv/versions/3.10.12/envs/opendata_dev_test/lib/python3.10/site-packages/requests/adapters.py:595)         assert_same_host=False,
    [596](https://vscode-remote+wsl-002bubuntu.vscode-resource.vscode-cdn.net/home/dsohrabian/repos/open-data-examples/~/.pyenv/versions/3.10.12/envs/opendata_dev_test/lib/python3.10/site-packages/requests/adapters.py:596)         preload_content=False,
    [597](https://vscode-remote+wsl-002bubuntu.vscode-resource.vscode-cdn.net/home/dsohrabian/repos/open-data-examples/~/.pyenv/versions/3.10.12/envs/opendata_dev_test/lib/python3.10/site-packages/requests/adapters.py:597)         decode_content=False,
    [598](https://vscode-remote+wsl-002bubuntu.vscode-resource.vscode-cdn.net/home/dsohrabian/repos/open-data-examples/~/.pyenv/versions/3.10.12/envs/opendata_dev_test/lib/python3.10/site-packages/requests/adapters.py:598)         retries=self.max_retries,
    [599](https://vscode-remote+wsl-002bubuntu.vscode-resource.vscode-cdn.net/home/dsohrabian/repos/open-data-examples/~/.pyenv/versions/3.10.12/envs/opendata_dev_test/lib/python3.10/site-packages/requests/adapters.py:599)         timeout=timeout,
    [600](https://vscode-remote+wsl-002bubuntu.vscode-resource.vscode-cdn.net/home/dsohrabian/repos/open-data-examples/~/.pyenv/versions/3.10.12/envs/opendata_dev_test/lib/python3.10/site-packages/requests/adapters.py:600)         chunked=chunked,
    [601](https://vscode-remote+wsl-002bubuntu.vscode-resource.vscode-cdn.net/home/dsohrabian/repos/open-data-examples/~/.pyenv/versions/3.10.12/envs/opendata_dev_test/lib/python3.10/site-packages/requests/adapters.py:601)     )
    [603](https://vscode-remote+wsl-002bubuntu.vscode-resource.vscode-cdn.net/home/dsohrabian/repos/open-data-examples/~/.pyenv/versions/3.10.12/envs/opendata_dev_test/lib/python3.10/site-packages/requests/adapters.py:603) except (ProtocolError, OSError) as err:

File ~/.pyenv/versions/3.10.12/envs/opendata_dev_test/lib/python3.10/site-packages/urllib3/connectionpool.py:793, in HTTPConnectionPool.urlopen(self, method, url, body, headers, retries, redirect, assert_same_host, timeout, pool_timeout, release_conn, chunked, body_pos, preload_content, decode_content, **response_kw)
    [792](https://vscode-remote+wsl-002bubuntu.vscode-resource.vscode-cdn.net/home/dsohrabian/repos/open-data-examples/~/.pyenv/versions/3.10.12/envs/opendata_dev_test/lib/python3.10/site-packages/urllib3/connectionpool.py:792) # Make the request on the HTTPConnection object
--> [793](https://vscode-remote+wsl-002bubuntu.vscode-resource.vscode-cdn.net/home/dsohrabian/repos/open-data-examples/~/.pyenv/versions/3.10.12/envs/opendata_dev_test/lib/python3.10/site-packages/urllib3/connectionpool.py:793) response = self._make_request(
    [794](https://vscode-remote+wsl-002bubuntu.vscode-resource.vscode-cdn.net/home/dsohrabian/repos/open-data-examples/~/.pyenv/versions/3.10.12/envs/opendata_dev_test/lib/python3.10/site-packages/urllib3/connectionpool.py:794)     conn,
    [795](https://vscode-remote+wsl-002bubuntu.vscode-resource.vscode-cdn.net/home/dsohrabian/repos/open-data-examples/~/.pyenv/versions/3.10.12/envs/opendata_dev_test/lib/python3.10/site-packages/urllib3/connectionpool.py:795)     method,
    [796](https://vscode-remote+wsl-002bubuntu.vscode-resource.vscode-cdn.net/home/dsohrabian/repos/open-data-examples/~/.pyenv/versions/3.10.12/envs/opendata_dev_test/lib/python3.10/site-packages/urllib3/connectionpool.py:796)     url,
    [797](https://vscode-remote+wsl-002bubuntu.vscode-resource.vscode-cdn.net/home/dsohrabian/repos/open-data-examples/~/.pyenv/versions/3.10.12/envs/opendata_dev_test/lib/python3.10/site-packages/urllib3/connectionpool.py:797)     timeout=timeout_obj,
    [798](https://vscode-remote+wsl-002bubuntu.vscode-resource.vscode-cdn.net/home/dsohrabian/repos/open-data-examples/~/.pyenv/versions/3.10.12/envs/opendata_dev_test/lib/python3.10/site-packages/urllib3/connectionpool.py:798)     body=body,
    [799](https://vscode-remote+wsl-002bubuntu.vscode-resource.vscode-cdn.net/home/dsohrabian/repos/open-data-examples/~/.pyenv/versions/3.10.12/envs/opendata_dev_test/lib/python3.10/site-packages/urllib3/connectionpool.py:799)     headers=headers,
    [800](https://vscode-remote+wsl-002bubuntu.vscode-resource.vscode-cdn.net/home/dsohrabian/repos/open-data-examples/~/.pyenv/versions/3.10.12/envs/opendata_dev_test/lib/python3.10/site-packages/urllib3/connectionpool.py:800)     chunked=chunked,
    [801](https://vscode-remote+wsl-002bubuntu.vscode-resource.vscode-cdn.net/home/dsohrabian/repos/open-data-examples/~/.pyenv/versions/3.10.12/envs/opendata_dev_test/lib/python3.10/site-packages/urllib3/connectionpool.py:801)     retries=retries,
    [802](https://vscode-remote+wsl-002bubuntu.vscode-resource.vscode-cdn.net/home/dsohrabian/repos/open-data-examples/~/.pyenv/versions/3.10.12/envs/opendata_dev_test/lib/python3.10/site-packages/urllib3/connectionpool.py:802)     response_conn=response_conn,
    [803](https://vscode-remote+wsl-002bubuntu.vscode-resource.vscode-cdn.net/home/dsohrabian/repos/open-data-examples/~/.pyenv/versions/3.10.12/envs/opendata_dev_test/lib/python3.10/site-packages/urllib3/connectionpool.py:803)     preload_content=preload_content,
    [804](https://vscode-remote+wsl-002bubuntu.vscode-resource.vscode-cdn.net/home/dsohrabian/repos/open-data-examples/~/.pyenv/versions/3.10.12/envs/opendata_dev_test/lib/python3.10/site-packages/urllib3/connectionpool.py:804)     decode_content=decode_content,
    [805](https://vscode-remote+wsl-002bubuntu.vscode-resource.vscode-cdn.net/home/dsohrabian/repos/open-data-examples/~/.pyenv/versions/3.10.12/envs/opendata_dev_test/lib/python3.10/site-packages/urllib3/connectionpool.py:805)     **response_kw,
    [806](https://vscode-remote+wsl-002bubuntu.vscode-resource.vscode-cdn.net/home/dsohrabian/repos/open-data-examples/~/.pyenv/versions/3.10.12/envs/opendata_dev_test/lib/python3.10/site-packages/urllib3/connectionpool.py:806) )
    [808](https://vscode-remote+wsl-002bubuntu.vscode-resource.vscode-cdn.net/home/dsohrabian/repos/open-data-examples/~/.pyenv/versions/3.10.12/envs/opendata_dev_test/lib/python3.10/site-packages/urllib3/connectionpool.py:808) # Everything went great!

File ~/.pyenv/versions/3.10.12/envs/opendata_dev_test/lib/python3.10/site-packages/urllib3/connectionpool.py:467, in HTTPConnectionPool._make_request(self, conn, method, url, body, headers, retries, timeout, chunked, response_conn, preload_content, decode_content, enforce_content_length)
    [466](https://vscode-remote+wsl-002bubuntu.vscode-resource.vscode-cdn.net/home/dsohrabian/repos/open-data-examples/~/.pyenv/versions/3.10.12/envs/opendata_dev_test/lib/python3.10/site-packages/urllib3/connectionpool.py:466) try:
--> [467](https://vscode-remote+wsl-002bubuntu.vscode-resource.vscode-cdn.net/home/dsohrabian/repos/open-data-examples/~/.pyenv/versions/3.10.12/envs/opendata_dev_test/lib/python3.10/site-packages/urllib3/connectionpool.py:467)     self._validate_conn(conn)
    [468](https://vscode-remote+wsl-002bubuntu.vscode-resource.vscode-cdn.net/home/dsohrabian/repos/open-data-examples/~/.pyenv/versions/3.10.12/envs/opendata_dev_test/lib/python3.10/site-packages/urllib3/connectionpool.py:468) except (SocketTimeout, BaseSSLError) as e:

File ~/.pyenv/versions/3.10.12/envs/opendata_dev_test/lib/python3.10/site-packages/urllib3/connectionpool.py:1099, in HTTPSConnectionPool._validate_conn(self, conn)
   [1098](https://vscode-remote+wsl-002bubuntu.vscode-resource.vscode-cdn.net/home/dsohrabian/repos/open-data-examples/~/.pyenv/versions/3.10.12/envs/opendata_dev_test/lib/python3.10/site-packages/urllib3/connectionpool.py:1098) if conn.is_closed:
-> [1099](https://vscode-remote+wsl-002bubuntu.vscode-resource.vscode-cdn.net/home/dsohrabian/repos/open-data-examples/~/.pyenv/versions/3.10.12/envs/opendata_dev_test/lib/python3.10/site-packages/urllib3/connectionpool.py:1099)     conn.connect()
   [1101](https://vscode-remote+wsl-002bubuntu.vscode-resource.vscode-cdn.net/home/dsohrabian/repos/open-data-examples/~/.pyenv/versions/3.10.12/envs/opendata_dev_test/lib/python3.10/site-packages/urllib3/connectionpool.py:1101) # TODO revise this, see https://github.com/urllib3/urllib3/issues/2791

File ~/.pyenv/versions/3.10.12/envs/opendata_dev_test/lib/python3.10/site-packages/urllib3/connection.py:653, in HTTPSConnection.connect(self)
    [651](https://vscode-remote+wsl-002bubuntu.vscode-resource.vscode-cdn.net/home/dsohrabian/repos/open-data-examples/~/.pyenv/versions/3.10.12/envs/opendata_dev_test/lib/python3.10/site-packages/urllib3/connection.py:651) server_hostname_rm_dot = server_hostname.rstrip(".")
--> [653](https://vscode-remote+wsl-002bubuntu.vscode-resource.vscode-cdn.net/home/dsohrabian/repos/open-data-examples/~/.pyenv/versions/3.10.12/envs/opendata_dev_test/lib/python3.10/site-packages/urllib3/connection.py:653) sock_and_verified = _ssl_wrap_socket_and_match_hostname(
    [654](https://vscode-remote+wsl-002bubuntu.vscode-resource.vscode-cdn.net/home/dsohrabian/repos/open-data-examples/~/.pyenv/versions/3.10.12/envs/opendata_dev_test/lib/python3.10/site-packages/urllib3/connection.py:654)     sock=sock,
    [655](https://vscode-remote+wsl-002bubuntu.vscode-resource.vscode-cdn.net/home/dsohrabian/repos/open-data-examples/~/.pyenv/versions/3.10.12/envs/opendata_dev_test/lib/python3.10/site-packages/urllib3/connection.py:655)     cert_reqs=self.cert_reqs,
    [656](https://vscode-remote+wsl-002bubuntu.vscode-resource.vscode-cdn.net/home/dsohrabian/repos/open-data-examples/~/.pyenv/versions/3.10.12/envs/opendata_dev_test/lib/python3.10/site-packages/urllib3/connection.py:656)     ssl_version=self.ssl_version,
    [657](https://vscode-remote+wsl-002bubuntu.vscode-resource.vscode-cdn.net/home/dsohrabian/repos/open-data-examples/~/.pyenv/versions/3.10.12/envs/opendata_dev_test/lib/python3.10/site-packages/urllib3/connection.py:657)     ssl_minimum_version=self.ssl_minimum_version,
    [658](https://vscode-remote+wsl-002bubuntu.vscode-resource.vscode-cdn.net/home/dsohrabian/repos/open-data-examples/~/.pyenv/versions/3.10.12/envs/opendata_dev_test/lib/python3.10/site-packages/urllib3/connection.py:658)     ssl_maximum_version=self.ssl_maximum_version,
    [659](https://vscode-remote+wsl-002bubuntu.vscode-resource.vscode-cdn.net/home/dsohrabian/repos/open-data-examples/~/.pyenv/versions/3.10.12/envs/opendata_dev_test/lib/python3.10/site-packages/urllib3/connection.py:659)     ca_certs=self.ca_certs,
    [660](https://vscode-remote+wsl-002bubuntu.vscode-resource.vscode-cdn.net/home/dsohrabian/repos/open-data-examples/~/.pyenv/versions/3.10.12/envs/opendata_dev_test/lib/python3.10/site-packages/urllib3/connection.py:660)     ca_cert_dir=self.ca_cert_dir,
    [661](https://vscode-remote+wsl-002bubuntu.vscode-resource.vscode-cdn.net/home/dsohrabian/repos/open-data-examples/~/.pyenv/versions/3.10.12/envs/opendata_dev_test/lib/python3.10/site-packages/urllib3/connection.py:661)     ca_cert_data=self.ca_cert_data,
    [662](https://vscode-remote+wsl-002bubuntu.vscode-resource.vscode-cdn.net/home/dsohrabian/repos/open-data-examples/~/.pyenv/versions/3.10.12/envs/opendata_dev_test/lib/python3.10/site-packages/urllib3/connection.py:662)     cert_file=self.cert_file,
    [663](https://vscode-remote+wsl-002bubuntu.vscode-resource.vscode-cdn.net/home/dsohrabian/repos/open-data-examples/~/.pyenv/versions/3.10.12/envs/opendata_dev_test/lib/python3.10/site-packages/urllib3/connection.py:663)     key_file=self.key_file,
    [664](https://vscode-remote+wsl-002bubuntu.vscode-resource.vscode-cdn.net/home/dsohrabian/repos/open-data-examples/~/.pyenv/versions/3.10.12/envs/opendata_dev_test/lib/python3.10/site-packages/urllib3/connection.py:664)     key_password=self.key_password,
    [665](https://vscode-remote+wsl-002bubuntu.vscode-resource.vscode-cdn.net/home/dsohrabian/repos/open-data-examples/~/.pyenv/versions/3.10.12/envs/opendata_dev_test/lib/python3.10/site-packages/urllib3/connection.py:665)     server_hostname=server_hostname_rm_dot,
    [666](https://vscode-remote+wsl-002bubuntu.vscode-resource.vscode-cdn.net/home/dsohrabian/repos/open-data-examples/~/.pyenv/versions/3.10.12/envs/opendata_dev_test/lib/python3.10/site-packages/urllib3/connection.py:666)     ssl_context=self.ssl_context,
    [667](https://vscode-remote+wsl-002bubuntu.vscode-resource.vscode-cdn.net/home/dsohrabian/repos/open-data-examples/~/.pyenv/versions/3.10.12/envs/opendata_dev_test/lib/python3.10/site-packages/urllib3/connection.py:667)     tls_in_tls=tls_in_tls,
    [668](https://vscode-remote+wsl-002bubuntu.vscode-resource.vscode-cdn.net/home/dsohrabian/repos/open-data-examples/~/.pyenv/versions/3.10.12/envs/opendata_dev_test/lib/python3.10/site-packages/urllib3/connection.py:668)     assert_hostname=self.assert_hostname,
    [669](https://vscode-remote+wsl-002bubuntu.vscode-resource.vscode-cdn.net/home/dsohrabian/repos/open-data-examples/~/.pyenv/versions/3.10.12/envs/opendata_dev_test/lib/python3.10/site-packages/urllib3/connection.py:669)     assert_fingerprint=self.assert_fingerprint,
    [670](https://vscode-remote+wsl-002bubuntu.vscode-resource.vscode-cdn.net/home/dsohrabian/repos/open-data-examples/~/.pyenv/versions/3.10.12/envs/opendata_dev_test/lib/python3.10/site-packages/urllib3/connection.py:670) )
    [671](https://vscode-remote+wsl-002bubuntu.vscode-resource.vscode-cdn.net/home/dsohrabian/repos/open-data-examples/~/.pyenv/versions/3.10.12/envs/opendata_dev_test/lib/python3.10/site-packages/urllib3/connection.py:671) self.sock = sock_and_verified.socket

File ~/.pyenv/versions/3.10.12/envs/opendata_dev_test/lib/python3.10/site-packages/urllib3/connection.py:768, in _ssl_wrap_socket_and_match_hostname(sock, cert_reqs, ssl_version, ssl_minimum_version, ssl_maximum_version, cert_file, key_file, key_password, ca_certs, ca_cert_dir, ca_cert_data, assert_hostname, assert_fingerprint, server_hostname, ssl_context, tls_in_tls)
    [766](https://vscode-remote+wsl-002bubuntu.vscode-resource.vscode-cdn.net/home/dsohrabian/repos/open-data-examples/~/.pyenv/versions/3.10.12/envs/opendata_dev_test/lib/python3.10/site-packages/urllib3/connection.py:766)     context = ssl_context
--> [768](https://vscode-remote+wsl-002bubuntu.vscode-resource.vscode-cdn.net/home/dsohrabian/repos/open-data-examples/~/.pyenv/versions/3.10.12/envs/opendata_dev_test/lib/python3.10/site-packages/urllib3/connection.py:768) context.verify_mode = resolve_cert_reqs(cert_reqs)
    [770](https://vscode-remote+wsl-002bubuntu.vscode-resource.vscode-cdn.net/home/dsohrabian/repos/open-data-examples/~/.pyenv/versions/3.10.12/envs/opendata_dev_test/lib/python3.10/site-packages/urllib3/connection.py:770) # In some cases, we want to verify hostnames ourselves

File ~/.pyenv/versions/3.10.12/lib/python3.10/ssl.py:738, in SSLContext.verify_mode(self, value)
    [736](https://vscode-remote+wsl-002bubuntu.vscode-resource.vscode-cdn.net/home/dsohrabian/repos/open-data-examples/~/.pyenv/versions/3.10.12/lib/python3.10/ssl.py:736) @verify_mode.setter
    [737](https://vscode-remote+wsl-002bubuntu.vscode-resource.vscode-cdn.net/home/dsohrabian/repos/open-data-examples/~/.pyenv/versions/3.10.12/lib/python3.10/ssl.py:737) def verify_mode(self, value):
--> [738](https://vscode-remote+wsl-002bubuntu.vscode-resource.vscode-cdn.net/home/dsohrabian/repos/open-data-examples/~/.pyenv/versions/3.10.12/lib/python3.10/ssl.py:738)     super(SSLContext, SSLContext).verify_mode.__set__(self, value)

File ~/.pyenv/versions/3.10.12/lib/python3.10/ssl.py:738, in SSLContext.verify_mode(self, value)
    [736](https://vscode-remote+wsl-002bubuntu.vscode-resource.vscode-cdn.net/home/dsohrabian/repos/open-data-examples/~/.pyenv/versions/3.10.12/lib/python3.10/ssl.py:736) @verify_mode.setter
    [737](https://vscode-remote+wsl-002bubuntu.vscode-resource.vscode-cdn.net/home/dsohrabian/repos/open-data-examples/~/.pyenv/versions/3.10.12/lib/python3.10/ssl.py:737) def verify_mode(self, value):
--> [738](https://vscode-remote+wsl-002bubuntu.vscode-resource.vscode-cdn.net/home/dsohrabian/repos/open-data-examples/~/.pyenv/versions/3.10.12/lib/python3.10/ssl.py:738)     super(SSLContext, SSLContext).verify_mode.__set__(self, value)

    [... skipping similar frames: SSLContext.verify_mode at line 738 (1475 times)]

File ~/.pyenv/versions/3.10.12/lib/python3.10/ssl.py:738, in SSLContext.verify_mode(self, value)
    [736](https://vscode-remote+wsl-002bubuntu.vscode-resource.vscode-cdn.net/home/dsohrabian/repos/open-data-examples/~/.pyenv/versions/3.10.12/lib/python3.10/ssl.py:736) @verify_mode.setter
    [737](https://vscode-remote+wsl-002bubuntu.vscode-resource.vscode-cdn.net/home/dsohrabian/repos/open-data-examples/~/.pyenv/versions/3.10.12/lib/python3.10/ssl.py:737) def verify_mode(self, value):
--> [738](https://vscode-remote+wsl-002bubuntu.vscode-resource.vscode-cdn.net/home/dsohrabian/repos/open-data-examples/~/.pyenv/versions/3.10.12/lib/python3.10/ssl.py:738)     super(SSLContext, SSLContext).verify_mode.__set__(self, value)

RecursionError: maximum recursion depth exceeded

During handling of the above exception, another exception occurred:

Exception                                 Traceback (most recent call last)
Cell In[1], [line 6](vscode-notebook-cell:?execution_count=1&line=6)
      [3](vscode-notebook-cell:?execution_count=1&line=3) import requests
      [4](vscode-notebook-cell:?execution_count=1&line=4) arcgis.__version__
----> [6](vscode-notebook-cell:?execution_count=1&line=6) gis = GIS()

File ~/.pyenv/versions/3.10.12/envs/opendata_dev_test/lib/python3.10/site-packages/arcgis/gis/__init__.py:609, in GIS.__init__(self, url, username, password, key_file, cert_file, verify_cert, set_active, client_id, profile, **kwargs)
    [603](https://vscode-remote+wsl-002bubuntu.vscode-resource.vscode-cdn.net/home/dsohrabian/repos/open-data-examples/~/.pyenv/versions/3.10.12/envs/opendata_dev_test/lib/python3.10/site-packages/arcgis/gis/__init__.py:603)         raise RuntimeError(
    [604](https://vscode-remote+wsl-002bubuntu.vscode-resource.vscode-cdn.net/home/dsohrabian/repos/open-data-examples/~/.pyenv/versions/3.10.12/envs/opendata_dev_test/lib/python3.10/site-packages/arcgis/gis/__init__.py:604)             "An untrusted SSL error occurred when attempting to connect to the provided GIS.\n"
    [605](https://vscode-remote+wsl-002bubuntu.vscode-resource.vscode-cdn.net/home/dsohrabian/repos/open-data-examples/~/.pyenv/versions/3.10.12/envs/opendata_dev_test/lib/python3.10/site-packages/arcgis/gis/__init__.py:605)             "If you trust this server and want to proceed, add 'verify_cert=False' as an "
    [606](https://vscode-remote+wsl-002bubuntu.vscode-resource.vscode-cdn.net/home/dsohrabian/repos/open-data-examples/~/.pyenv/versions/3.10.12/envs/opendata_dev_test/lib/python3.10/site-packages/arcgis/gis/__init__.py:606)             "argument when connecting to the GIS."
    [607](https://vscode-remote+wsl-002bubuntu.vscode-resource.vscode-cdn.net/home/dsohrabian/repos/open-data-examples/~/.pyenv/versions/3.10.12/envs/opendata_dev_test/lib/python3.10/site-packages/arcgis/gis/__init__.py:607)         )
    [608](https://vscode-remote+wsl-002bubuntu.vscode-resource.vscode-cdn.net/home/dsohrabian/repos/open-data-examples/~/.pyenv/versions/3.10.12/envs/opendata_dev_test/lib/python3.10/site-packages/arcgis/gis/__init__.py:608)     else:
--> [609](https://vscode-remote+wsl-002bubuntu.vscode-resource.vscode-cdn.net/home/dsohrabian/repos/open-data-examples/~/.pyenv/versions/3.10.12/envs/opendata_dev_test/lib/python3.10/site-packages/arcgis/gis/__init__.py:609)         raise e
    [610](https://vscode-remote+wsl-002bubuntu.vscode-resource.vscode-cdn.net/home/dsohrabian/repos/open-data-examples/~/.pyenv/versions/3.10.12/envs/opendata_dev_test/lib/python3.10/site-packages/arcgis/gis/__init__.py:610) try:
    [611](https://vscode-remote+wsl-002bubuntu.vscode-resource.vscode-cdn.net/home/dsohrabian/repos/open-data-examples/~/.pyenv/versions/3.10.12/envs/opendata_dev_test/lib/python3.10/site-packages/arcgis/gis/__init__.py:611)     if (
    [612](https://vscode-remote+wsl-002bubuntu.vscode-resource.vscode-cdn.net/home/dsohrabian/repos/open-data-examples/~/.pyenv/versions/3.10.12/envs/opendata_dev_test/lib/python3.10/site-packages/arcgis/gis/__init__.py:612)         url.lower().find("arcgis.com") > -1
    [613](https://vscode-remote+wsl-002bubuntu.vscode-resource.vscode-cdn.net/home/dsohrabian/repos/open-data-examples/~/.pyenv/versions/3.10.12/envs/opendata_dev_test/lib/python3.10/site-packages/arcgis/gis/__init__.py:613)         and self._portal.is_logged_in
    [614](https://vscode-remote+wsl-002bubuntu.vscode-resource.vscode-cdn.net/home/dsohrabian/repos/open-data-examples/~/.pyenv/versions/3.10.12/envs/opendata_dev_test/lib/python3.10/site-packages/arcgis/gis/__init__.py:614)         and self._portal.con._auth.lower() == "oauth"
    [615](https://vscode-remote+wsl-002bubuntu.vscode-resource.vscode-cdn.net/home/dsohrabian/repos/open-data-examples/~/.pyenv/versions/3.10.12/envs/opendata_dev_test/lib/python3.10/site-packages/arcgis/gis/__init__.py:615)     ):

File ~/.pyenv/versions/3.10.12/envs/opendata_dev_test/lib/python3.10/site-packages/arcgis/gis/__init__.py:548, in GIS.__init__(self, url, username, password, key_file, cert_file, verify_cert, set_active, client_id, profile, **kwargs)
    [546](https://vscode-remote+wsl-002bubuntu.vscode-resource.vscode-cdn.net/home/dsohrabian/repos/open-data-examples/~/.pyenv/versions/3.10.12/envs/opendata_dev_test/lib/python3.10/site-packages/arcgis/gis/__init__.py:546)     self._expiration = 60
    [547](https://vscode-remote+wsl-002bubuntu.vscode-resource.vscode-cdn.net/home/dsohrabian/repos/open-data-examples/~/.pyenv/versions/3.10.12/envs/opendata_dev_test/lib/python3.10/site-packages/arcgis/gis/__init__.py:547) try:
--> [548](https://vscode-remote+wsl-002bubuntu.vscode-resource.vscode-cdn.net/home/dsohrabian/repos/open-data-examples/~/.pyenv/versions/3.10.12/envs/opendata_dev_test/lib/python3.10/site-packages/arcgis/gis/__init__.py:548)     self._portal = _portalpy.Portal(
    [549](https://vscode-remote+wsl-002bubuntu.vscode-resource.vscode-cdn.net/home/dsohrabian/repos/open-data-examples/~/.pyenv/versions/3.10.12/envs/opendata_dev_test/lib/python3.10/site-packages/arcgis/gis/__init__.py:549)         self._url,
    [550](https://vscode-remote+wsl-002bubuntu.vscode-resource.vscode-cdn.net/home/dsohrabian/repos/open-data-examples/~/.pyenv/versions/3.10.12/envs/opendata_dev_test/lib/python3.10/site-packages/arcgis/gis/__init__.py:550)         self._username,
    [551](https://vscode-remote+wsl-002bubuntu.vscode-resource.vscode-cdn.net/home/dsohrabian/repos/open-data-examples/~/.pyenv/versions/3.10.12/envs/opendata_dev_test/lib/python3.10/site-packages/arcgis/gis/__init__.py:551)         self._password,
    [552](https://vscode-remote+wsl-002bubuntu.vscode-resource.vscode-cdn.net/home/dsohrabian/repos/open-data-examples/~/.pyenv/versions/3.10.12/envs/opendata_dev_test/lib/python3.10/site-packages/arcgis/gis/__init__.py:552)         self._key_file,
    [553](https://vscode-remote+wsl-002bubuntu.vscode-resource.vscode-cdn.net/home/dsohrabian/repos/open-data-examples/~/.pyenv/versions/3.10.12/envs/opendata_dev_test/lib/python3.10/site-packages/arcgis/gis/__init__.py:553)         self._cert_file,
    [554](https://vscode-remote+wsl-002bubuntu.vscode-resource.vscode-cdn.net/home/dsohrabian/repos/open-data-examples/~/.pyenv/versions/3.10.12/envs/opendata_dev_test/lib/python3.10/site-packages/arcgis/gis/__init__.py:554)         proxy_host=self._proxy_host,
    [555](https://vscode-remote+wsl-002bubuntu.vscode-resource.vscode-cdn.net/home/dsohrabian/repos/open-data-examples/~/.pyenv/versions/3.10.12/envs/opendata_dev_test/lib/python3.10/site-packages/arcgis/gis/__init__.py:555)         proxy_port=self._proxy_port,
    [556](https://vscode-remote+wsl-002bubuntu.vscode-resource.vscode-cdn.net/home/dsohrabian/repos/open-data-examples/~/.pyenv/versions/3.10.12/envs/opendata_dev_test/lib/python3.10/site-packages/arcgis/gis/__init__.py:556)         verify_cert=self._verify_cert,
    [557](https://vscode-remote+wsl-002bubuntu.vscode-resource.vscode-cdn.net/home/dsohrabian/repos/open-data-examples/~/.pyenv/versions/3.10.12/envs/opendata_dev_test/lib/python3.10/site-packages/arcgis/gis/__init__.py:557)         client_id=self._client_id,
    [558](https://vscode-remote+wsl-002bubuntu.vscode-resource.vscode-cdn.net/home/dsohrabian/repos/open-data-examples/~/.pyenv/versions/3.10.12/envs/opendata_dev_test/lib/python3.10/site-packages/arcgis/gis/__init__.py:558)         expiration=self._expiration,
    [559](https://vscode-remote+wsl-002bubuntu.vscode-resource.vscode-cdn.net/home/dsohrabian/repos/open-data-examples/~/.pyenv/versions/3.10.12/envs/opendata_dev_test/lib/python3.10/site-packages/arcgis/gis/__init__.py:559)         referer=self._referer,
    [560](https://vscode-remote+wsl-002bubuntu.vscode-resource.vscode-cdn.net/home/dsohrabian/repos/open-data-examples/~/.pyenv/versions/3.10.12/envs/opendata_dev_test/lib/python3.10/site-packages/arcgis/gis/__init__.py:560)         custom_auth=custom_auth,  # token=self._utoken,
    [561](https://vscode-remote+wsl-002bubuntu.vscode-resource.vscode-cdn.net/home/dsohrabian/repos/open-data-examples/~/.pyenv/versions/3.10.12/envs/opendata_dev_test/lib/python3.10/site-packages/arcgis/gis/__init__.py:561)         client_secret=client_secret,
    [562](https://vscode-remote+wsl-002bubuntu.vscode-resource.vscode-cdn.net/home/dsohrabian/repos/open-data-examples/~/.pyenv/versions/3.10.12/envs/opendata_dev_test/lib/python3.10/site-packages/arcgis/gis/__init__.py:562)         trust_env=kwargs.get("trust_env", None),
    [563](https://vscode-remote+wsl-002bubuntu.vscode-resource.vscode-cdn.net/home/dsohrabian/repos/open-data-examples/~/.pyenv/versions/3.10.12/envs/opendata_dev_test/lib/python3.10/site-packages/arcgis/gis/__init__.py:563)         timeout=self._timeout,
    [564](https://vscode-remote+wsl-002bubuntu.vscode-resource.vscode-cdn.net/home/dsohrabian/repos/open-data-examples/~/.pyenv/versions/3.10.12/envs/opendata_dev_test/lib/python3.10/site-packages/arcgis/gis/__init__.py:564)         proxy=kwargs.get("proxy", None),
    [565](https://vscode-remote+wsl-002bubuntu.vscode-resource.vscode-cdn.net/home/dsohrabian/repos/open-data-examples/~/.pyenv/versions/3.10.12/envs/opendata_dev_test/lib/python3.10/site-packages/arcgis/gis/__init__.py:565)         custom_adapter=custom_adapter,
    [566](https://vscode-remote+wsl-002bubuntu.vscode-resource.vscode-cdn.net/home/dsohrabian/repos/open-data-examples/~/.pyenv/versions/3.10.12/envs/opendata_dev_test/lib/python3.10/site-packages/arcgis/gis/__init__.py:566)         token=self._utoken,
    [567](https://vscode-remote+wsl-002bubuntu.vscode-resource.vscode-cdn.net/home/dsohrabian/repos/open-data-examples/~/.pyenv/versions/3.10.12/envs/opendata_dev_test/lib/python3.10/site-packages/arcgis/gis/__init__.py:567)         api_key=self._api_key,
    [568](https://vscode-remote+wsl-002bubuntu.vscode-resource.vscode-cdn.net/home/dsohrabian/repos/open-data-examples/~/.pyenv/versions/3.10.12/envs/opendata_dev_test/lib/python3.10/site-packages/arcgis/gis/__init__.py:568)         is_hosted_nb_home=self._is_hosted_nb_home,
    [569](https://vscode-remote+wsl-002bubuntu.vscode-resource.vscode-cdn.net/home/dsohrabian/repos/open-data-examples/~/.pyenv/versions/3.10.12/envs/opendata_dev_test/lib/python3.10/site-packages/arcgis/gis/__init__.py:569)         use_gen_token=self._use_gen_token,
    [570](https://vscode-remote+wsl-002bubuntu.vscode-resource.vscode-cdn.net/home/dsohrabian/repos/open-data-examples/~/.pyenv/versions/3.10.12/envs/opendata_dev_test/lib/python3.10/site-packages/arcgis/gis/__init__.py:570)         security_kwargs=security_kwargs,
    [571](https://vscode-remote+wsl-002bubuntu.vscode-resource.vscode-cdn.net/home/dsohrabian/repos/open-data-examples/~/.pyenv/versions/3.10.12/envs/opendata_dev_test/lib/python3.10/site-packages/arcgis/gis/__init__.py:571)     )
    [572](https://vscode-remote+wsl-002bubuntu.vscode-resource.vscode-cdn.net/home/dsohrabian/repos/open-data-examples/~/.pyenv/versions/3.10.12/envs/opendata_dev_test/lib/python3.10/site-packages/arcgis/gis/__init__.py:572)     if self._portal.is_kubernetes:
    [573](https://vscode-remote+wsl-002bubuntu.vscode-resource.vscode-cdn.net/home/dsohrabian/repos/open-data-examples/~/.pyenv/versions/3.10.12/envs/opendata_dev_test/lib/python3.10/site-packages/arcgis/gis/__init__.py:573)         from .kubernetes._sharing import KbertnetesPy

File ~/.pyenv/versions/3.10.12/envs/opendata_dev_test/lib/python3.10/site-packages/arcgis/gis/_impl/_portalpy.py:232, in Portal.__init__(self, url, username, password, key_file, cert_file, expiration, referer, proxy_host, proxy_port, connection, workdir, tokenurl, verify_cert, client_id, custom_auth, token, **kwargs)
    [205](https://vscode-remote+wsl-002bubuntu.vscode-resource.vscode-cdn.net/home/dsohrabian/repos/open-data-examples/~/.pyenv/versions/3.10.12/envs/opendata_dev_test/lib/python3.10/site-packages/arcgis/gis/_impl/_portalpy.py:205)         self.con = Connection(
    [206](https://vscode-remote+wsl-002bubuntu.vscode-resource.vscode-cdn.net/home/dsohrabian/repos/open-data-examples/~/.pyenv/versions/3.10.12/envs/opendata_dev_test/lib/python3.10/site-packages/arcgis/gis/_impl/_portalpy.py:206)             baseurl=self.resturl,
    [207](https://vscode-remote+wsl-002bubuntu.vscode-resource.vscode-cdn.net/home/dsohrabian/repos/open-data-examples/~/.pyenv/versions/3.10.12/envs/opendata_dev_test/lib/python3.10/site-packages/arcgis/gis/_impl/_portalpy.py:207)             tokenurl=tokenurl,
   (...)
    [229](https://vscode-remote+wsl-002bubuntu.vscode-resource.vscode-cdn.net/home/dsohrabian/repos/open-data-examples/~/.pyenv/versions/3.10.12/envs/opendata_dev_test/lib/python3.10/site-packages/arcgis/gis/_impl/_portalpy.py:229)             security_kwargs=self._security_kwargs,
    [230](https://vscode-remote+wsl-002bubuntu.vscode-resource.vscode-cdn.net/home/dsohrabian/repos/open-data-examples/~/.pyenv/versions/3.10.12/envs/opendata_dev_test/lib/python3.10/site-packages/arcgis/gis/_impl/_portalpy.py:230)         )
    [231](https://vscode-remote+wsl-002bubuntu.vscode-resource.vscode-cdn.net/home/dsohrabian/repos/open-data-examples/~/.pyenv/versions/3.10.12/envs/opendata_dev_test/lib/python3.10/site-packages/arcgis/gis/_impl/_portalpy.py:231) # self.get_version(True)
--> [232](https://vscode-remote+wsl-002bubuntu.vscode-resource.vscode-cdn.net/home/dsohrabian/repos/open-data-examples/~/.pyenv/versions/3.10.12/envs/opendata_dev_test/lib/python3.10/site-packages/arcgis/gis/_impl/_portalpy.py:232) self.get_properties(True)

File ~/.pyenv/versions/3.10.12/envs/opendata_dev_test/lib/python3.10/site-packages/arcgis/gis/_impl/_portalpy.py:1300, in Portal.get_properties(self, force)
   [1296](https://vscode-remote+wsl-002bubuntu.vscode-resource.vscode-cdn.net/home/dsohrabian/repos/open-data-examples/~/.pyenv/versions/3.10.12/envs/opendata_dev_test/lib/python3.10/site-packages/arcgis/gis/_impl/_portalpy.py:1296)         resp = self.con.get(
   [1297](https://vscode-remote+wsl-002bubuntu.vscode-resource.vscode-cdn.net/home/dsohrabian/repos/open-data-examples/~/.pyenv/versions/3.10.12/envs/opendata_dev_test/lib/python3.10/site-packages/arcgis/gis/_impl/_portalpy.py:1297)             path, ssl=True
   [1298](https://vscode-remote+wsl-002bubuntu.vscode-resource.vscode-cdn.net/home/dsohrabian/repos/open-data-examples/~/.pyenv/versions/3.10.12/envs/opendata_dev_test/lib/python3.10/site-packages/arcgis/gis/_impl/_portalpy.py:1298)         )  # issue seen with key, cert auth
   [1299](https://vscode-remote+wsl-002bubuntu.vscode-resource.vscode-cdn.net/home/dsohrabian/repos/open-data-examples/~/.pyenv/versions/3.10.12/envs/opendata_dev_test/lib/python3.10/site-packages/arcgis/gis/_impl/_portalpy.py:1299)     if not resp:
-> [1300](https://vscode-remote+wsl-002bubuntu.vscode-resource.vscode-cdn.net/home/dsohrabian/repos/open-data-examples/~/.pyenv/versions/3.10.12/envs/opendata_dev_test/lib/python3.10/site-packages/arcgis/gis/_impl/_portalpy.py:1300)         raise e
   [1302](https://vscode-remote+wsl-002bubuntu.vscode-resource.vscode-cdn.net/home/dsohrabian/repos/open-data-examples/~/.pyenv/versions/3.10.12/envs/opendata_dev_test/lib/python3.10/site-packages/arcgis/gis/_impl/_portalpy.py:1302) if resp:
   [1303](https://vscode-remote+wsl-002bubuntu.vscode-resource.vscode-cdn.net/home/dsohrabian/repos/open-data-examples/~/.pyenv/versions/3.10.12/envs/opendata_dev_test/lib/python3.10/site-packages/arcgis/gis/_impl/_portalpy.py:1303)     self._properties = resp

File ~/.pyenv/versions/3.10.12/envs/opendata_dev_test/lib/python3.10/site-packages/arcgis/gis/_impl/_portalpy.py:1280, in Portal.get_properties(self, force)
   [1278](https://vscode-remote+wsl-002bubuntu.vscode-resource.vscode-cdn.net/home/dsohrabian/repos/open-data-examples/~/.pyenv/versions/3.10.12/envs/opendata_dev_test/lib/python3.10/site-packages/arcgis/gis/_impl/_portalpy.py:1278) resp = None
   [1279](https://vscode-remote+wsl-002bubuntu.vscode-resource.vscode-cdn.net/home/dsohrabian/repos/open-data-examples/~/.pyenv/versions/3.10.12/envs/opendata_dev_test/lib/python3.10/site-packages/arcgis/gis/_impl/_portalpy.py:1279) try:
-> [1280](https://vscode-remote+wsl-002bubuntu.vscode-resource.vscode-cdn.net/home/dsohrabian/repos/open-data-examples/~/.pyenv/versions/3.10.12/envs/opendata_dev_test/lib/python3.10/site-packages/arcgis/gis/_impl/_portalpy.py:1280)     resp = self.con.post(path, self._postdata(), ssl=True)
   [1281](https://vscode-remote+wsl-002bubuntu.vscode-resource.vscode-cdn.net/home/dsohrabian/repos/open-data-examples/~/.pyenv/versions/3.10.12/envs/opendata_dev_test/lib/python3.10/site-packages/arcgis/gis/_impl/_portalpy.py:1281) except Exception as e:
   [1282](https://vscode-remote+wsl-002bubuntu.vscode-resource.vscode-cdn.net/home/dsohrabian/repos/open-data-examples/~/.pyenv/versions/3.10.12/envs/opendata_dev_test/lib/python3.10/site-packages/arcgis/gis/_impl/_portalpy.py:1282)     if (
   [1283](https://vscode-remote+wsl-002bubuntu.vscode-resource.vscode-cdn.net/home/dsohrabian/repos/open-data-examples/~/.pyenv/versions/3.10.12/envs/opendata_dev_test/lib/python3.10/site-packages/arcgis/gis/_impl/_portalpy.py:1283)         not self.con._verify_cert
   [1284](https://vscode-remote+wsl-002bubuntu.vscode-resource.vscode-cdn.net/home/dsohrabian/repos/open-data-examples/~/.pyenv/versions/3.10.12/envs/opendata_dev_test/lib/python3.10/site-packages/arcgis/gis/_impl/_portalpy.py:1284)         and (len(e.args) == 2)
   (...)
   [1288](https://vscode-remote+wsl-002bubuntu.vscode-resource.vscode-cdn.net/home/dsohrabian/repos/open-data-examples/~/.pyenv/versions/3.10.12/envs/opendata_dev_test/lib/python3.10/site-packages/arcgis/gis/_impl/_portalpy.py:1288)         )
   [1289](https://vscode-remote+wsl-002bubuntu.vscode-resource.vscode-cdn.net/home/dsohrabian/repos/open-data-examples/~/.pyenv/versions/3.10.12/envs/opendata_dev_test/lib/python3.10/site-packages/arcgis/gis/_impl/_portalpy.py:1289)     ):

File ~/.pyenv/versions/3.10.12/envs/opendata_dev_test/lib/python3.10/site-packages/arcgis/gis/_impl/_con/_connection.py:1515, in Connection.post(self, path, params, files, **kwargs)
   [1511](https://vscode-remote+wsl-002bubuntu.vscode-resource.vscode-cdn.net/home/dsohrabian/repos/open-data-examples/~/.pyenv/versions/3.10.12/envs/opendata_dev_test/lib/python3.10/site-packages/arcgis/gis/_impl/_con/_connection.py:1511)     raise requests.exceptions.RequestException(
   [1512](https://vscode-remote+wsl-002bubuntu.vscode-resource.vscode-cdn.net/home/dsohrabian/repos/open-data-examples/~/.pyenv/versions/3.10.12/envs/opendata_dev_test/lib/python3.10/site-packages/arcgis/gis/_impl/_con/_connection.py:1512)         "A general exception was raised: %s" % errRE
   [1513](https://vscode-remote+wsl-002bubuntu.vscode-resource.vscode-cdn.net/home/dsohrabian/repos/open-data-examples/~/.pyenv/versions/3.10.12/envs/opendata_dev_test/lib/python3.10/site-packages/arcgis/gis/_impl/_con/_connection.py:1513)     )
   [1514](https://vscode-remote+wsl-002bubuntu.vscode-resource.vscode-cdn.net/home/dsohrabian/repos/open-data-examples/~/.pyenv/versions/3.10.12/envs/opendata_dev_test/lib/python3.10/site-packages/arcgis/gis/_impl/_con/_connection.py:1514) except Exception as e:
-> [1515](https://vscode-remote+wsl-002bubuntu.vscode-resource.vscode-cdn.net/home/dsohrabian/repos/open-data-examples/~/.pyenv/versions/3.10.12/envs/opendata_dev_test/lib/python3.10/site-packages/arcgis/gis/_impl/_con/_connection.py:1515)     raise Exception("A general error occurred: %s" % e)
   [1516](https://vscode-remote+wsl-002bubuntu.vscode-resource.vscode-cdn.net/home/dsohrabian/repos/open-data-examples/~/.pyenv/versions/3.10.12/envs/opendata_dev_test/lib/python3.10/site-packages/arcgis/gis/_impl/_con/_connection.py:1516) except:
   [1517](https://vscode-remote+wsl-002bubuntu.vscode-resource.vscode-cdn.net/home/dsohrabian/repos/open-data-examples/~/.pyenv/versions/3.10.12/envs/opendata_dev_test/lib/python3.10/site-packages/arcgis/gis/_impl/_con/_connection.py:1517)     import traceback

Exception: A general error occurred: maximum recursion depth exceeded

Screenshots
If applicable, add screenshots to help explain your problem.

Expected behavior
GIS object instantiates so you can use this package

Platform (please complete the following information):

  • OS: WSL 2 Ubuntu
  • Browser Chrome
  • Python API Version 2.3

Additional context
I have confirmed by installing requests 2.32, running the code, it fails.
Install 2.31 or lower, running the code, it works.

This one put us into a state of chaos in the last 48 hours so would appreciate any tips on how we can avoid.

@dnsohrabian
Copy link
Author

dnsohrabian commented May 22, 2024

To corroborate, we started having issues with arcgis May 20th, which happens to be when 2.32 requests came out. I suspect you will be getting more complaints on this. The dependency is defined here allowing up to requests 3.0, so would kindly ask that it be restrained on here if possible to avoid.

image

@jacobdadams
Copy link

I can duplicate this on Windows:

  • conda create -n test && activate test && conda install python=3.11
  • pip install arcgis

Then run ipython and try to authenticate to an AGOL org.

I'm seeing some SSL context chatter on psf/requests#6715, so I wonder if this is a side effect of that as well.

@nanaeaubry
Copy link
Contributor

nanaeaubry commented May 23, 2024

Yes we have noticed this issue as well and we are working on it.

update: listen to Nate

cc @jtroe @achapkowski

@nateprewitt
Copy link

Chiming in from the Requests side of things, this is due to a bug in arcgis previously discussed in #1698. For the time being, it would be likely be preferred to uninstall truststore rather than completely disabling cert verification on windows until the usage is fixed in arcgis.

@achapkowski
Copy link
Contributor

Thanks @nateprewitt . I also look forward to the patch fixing the adapter which was out solution for #1698 from the requests side.

@jacobdadams
Copy link

Just tested the new requests 2.32.3 on both Windows and in a google cloud function and it's still erroring out at max recursion.

@achapkowski
Copy link
Contributor

We identified an issue and released patches in May to address it. These patches prevent you from using version 2.32.* of the requests library because version 2.32.3 wasn't available yet.

The next release (2.4.0) will permanently fix this issue. However, it will still require using specific versions of requests to avoid compatibility problems. If necessary, you can install the requests library after the update using pip install requests.

We're holding off on fully adopting version 2.32.* because some users are reporting issues with it. You can find more information about these issues on GitHub: psf/requests#6715 (comment)

@trahloff
Copy link

Hi @achapkowski , is there already an ETA for 2.4.0?

stdavis added a commit to agrc/deq-eid-skid that referenced this issue Aug 16, 2024
stdavis added a commit to agrc/deq-eid-skid that referenced this issue Aug 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants