PanosJee
PanosJee

Reputation: 3866

Urrlib3/Requests: HTTPS problems on Google App Engine

Hi I am trying to make an HTTPS connection using requests on App Engine but I get the following error

NameError: name 'CERT_NONE' is not defined

It seems that urrlib3 cannot import ssl. Any ideas?

Update: The problem is that ssl on App Engine is missing the following

from ssl import wrap_socket, CERT_NONE, SSLError

Upvotes: 5

Views: 1179

Answers (3)

rattray
rattray

Reputation: 6039

The fix mentioned by maxcnunes appears to have been merged into requests-1.2.0. Looks like it's working on my dev_appserver at least.

Upvotes: 0

maxcnunes
maxcnunes

Reputation: 3027

This problem was fixed by t-8ch as you can see on this call https://github.com/shazow/urllib3/pull/130 at urllib3 github repository.

They have not done the merge to master branch yet, but you can get the available package from the fixed branch of t-8ch here: https://github.com/t-8ch/urllib3/tree/unify_ssl_api

I have tested and this is working well.

Upvotes: 2

Stavros Korokithakis
Stavros Korokithakis

Reputation: 4946

Are you using the latest urllib3? They recently added support for GAE. I seem to recall you need to use the urlfetch API, rather than SSL directly.

Upvotes: -1

Related Questions