You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using truststore.inject_into_ssl() for a little app/script.
When I run it in a virtual environment (where I installed truststore separately) it gives me an error (see below).
When I run the same thing directly with my Python interpreter installed in Windows (10), it works.
Is there something I am missing in my virtual environment setup?
File "C:\Users\user1\Development\python\myapp\Lib\site-packages\requests\sessions.py", line 602, in get
return self.request("GET", url, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\user1\Development\python\myapp\Lib\site-packages\requests\sessions.py", line 589, in request
resp = self.send(prep, **send_kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\user1\Development\python\myapp\Lib\site-packages\requests\sessions.py", line 703, in send
r = adapter.send(request, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\user1\Development\python\myapp\Lib\site-packages\requests\adapters.py", line 667, in send
resp = conn.urlopen(
^^^^^^^^^^^^^
File "C:\Users\user1\Development\python\myapp\Lib\site-packages\urllib3\connectionpool.py", line 789, in urlopen
response = self._make_request(
^^^^^^^^^^^^^^^^^^^
File "C:\Users\user1\Development\python\myapp\Lib\site-packages\urllib3\connectionpool.py", line 466, in _make_request
self._validate_conn(conn)
File "C:\Users\user1\Development\python\myapp\Lib\site-packages\urllib3\connectionpool.py", line 1095, in _validate_conn
conn.connect()
File "C:\Users\user1\Development\python\myapp\Lib\site-packages\urllib3\connection.py", line 652, in connect
sock_and_verified = _ssl_wrap_socket_and_match_hostname(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\user1\Development\python\myapp\Lib\site-packages\urllib3\connection.py", line 767, in _ssl_wrap_socket_and_match_hostname
context.verify_mode = resolve_cert_reqs(cert_reqs)
^^^^^^^^^^^^^^^^^^^
File "C:\Users\user1\AppData\Local\Programs\Python\Python311\Lib\ssl.py", line 742, in verify_mode
super(SSLContext, SSLContext).verify_mode.__set__(self, value)
File "C:\Users\user1\AppData\Local\Programs\Python\Python311\Lib\ssl.py", line 742, in verify_mode
super(SSLContext, SSLContext).verify_mode.__set__(self, value)
File "C:\Users\user1\AppData\Local\Programs\Python\Python311\Lib\ssl.py", line 742, in verify_mode
super(SSLContext, SSLContext).verify_mode.__set__(self, value)
[Previous line repeated 491 more times]
RecursionError: maximum recursion depth exceeded while calling a Python object
The following is what pip list reports in my virtual environment:
@davisagli Thank you, that issue pointed me in the right direction.
Comparing the versions of the requests library in my global and pyenv installations, I saw that globally I had 2.28.2, while in the virtual environment I had 2.32.3.
Downgrading to 2.28.2 in the virtual environment did indeed solve the problem. (And I also had this on Linux/WSL, by the way).
Can one conclude from that, that the problem is with requests, or could it be a conjunctive problem between the libraries?
I am using
truststore.inject_into_ssl()
for a little app/script.When I run it in a virtual environment (where I installed
truststore
separately) it gives me an error (see below).When I run the same thing directly with my Python interpreter installed in Windows (10), it works.
Is there something I am missing in my virtual environment setup?
The following is what
pip list
reports in my virtual environment:The text was updated successfully, but these errors were encountered: