question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Getting WARNING:requests.packages.urllib3.contrib.pyopenssl when using python requests

See original GitHub issue

Hi, I’m using python’s requests module to make some API calls. Starting about a week ago, I get this warning message related to urllib3 every time I make a call:

WARNING:requests.packages.urllib3.contrib.pyopenssl:A problem was encountered with the certificate that prevented urllib3 from finding the SubjectAlternativeName field. This can affect certificate validation. The error was Codepoint U+002A at position 1 of u’*’ not allowed /Library/Python/2.7/site-packages/requests/packages/urllib3/connection.py:337: SubjectAltNameWarning: Certificate for plasma-ticket.geo.apple.com has no subjectAltName, falling back to check for a commonName for now. This feature is being removed by major browsers and deprecated by RFC 2818. (See https://github.com/shazow/urllib3/issues/497 for details.) SubjectAltNameWarning

Module versions: urllib3==1.10.4 requests==2.12.4 pyOpenSSL==0.15.1

An example of a requests call (I’m using a few different ones, but they all follow this same format):

response = requests.post(<url>, data = json.dumps(data), headers = self.headers) response_json = json.loads(response.content)

One note (that seems strange to me) is that I have logging set up using python’s logging module, and instead of these messages showing up in my .log file, they only show in my terminal window. Don’t know if that’s useful at all.

Thanks

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
sethmlarsoncommented, Mar 29, 2018

Hey @jcalabro, thanks for reporting this! Can you open a separate issue with your exact Python version and the contents of python -m pip freeze for your minimal-reproducing case?

1reaction
scottbarron1313commented, Jan 23, 2018

That seems to have done it! Thanks for the help!

Read more comments on GitHub >

github_iconTop Results From Across the Web

PyOpenSSL - urllib3 1.26.13 documentation
Follow these instructions if you would like to verify TLS certificates in Python 2. Note, the default libraries do not do certificate checking;...
Read more >
lib/requests/requests/packages/urllib3/contrib/pyopenssl.py
This needs the following packages installed: * pyOpenSSL (tested with 0.13) ... :func:`~urllib3.contrib.pyopenssl.inject_into_urllib3` from your Python code.
Read more >
Unverified HTTPS request is being made in Python2.6 ...
So the import will still resolve fine and one doesn't need to import urllib3 . To verify: python -c 'import requests; print(requests.packages.urllib3.__path__)' ...
Read more >
Requests' secret: pool_connections and pool_maxsize
Requests is one of the, if not the most well-known Python ... (1): www.baidu.com DEBUG:requests.packages.urllib3.connectionpool:"GET ...
Read more >
Python request module always returns certificate verify ...
An error is raised from the "request" module in the python ... .6/site-packages/urllib3/contrib/pyopenssl.py", line 441, in wrap_socket.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found