Re: [Tutor] python ssl error

2014-08-17 Thread Matthew Ngaha
On Sun, Aug 17, 2014 at 11:26 PM, Danny Yoo  wrote:

> I would recommend checking whether the 'cacerts.txt' file in that
> subdirectory is user-readable or not.  Make sure it's readable.  If it
> isn't, chmod it and try again: that will probably fix it.
>

Thanks ever so much for your efforts! I'm glad to say your suggestion
above fixed the problem.
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] python ssl error

2014-08-17 Thread Danny Yoo
On Sun, Aug 17, 2014 at 5:14 AM, Matthew Ngaha  wrote:
> Hi this might not be the correct place to ask this. I am using the
> google api and as soon as I use the build function:
>
> service = build('books', 'v1', developerKey=api_key)
>
> I get an SSL error. I'm not sure what build() does but it triggers an
> SSL error. Here's the error message:
>
>  ssl.SSLError: [Errno 185090050] _ssl.c:357: error:0B084002:x509
> certificate routines:X509_load_cert_crl_file:system lib


Hi Matthew,

Yeah, this is not quite Python-Tutor material.  Check with the
httplib2 folks: I think this in is their domain.

Anyway, thanks for the detailed error message.  It gives me something
to search.  I'll see if there's something reasonable here...

... ok, found something.  According to:


http://stackoverflow.com/questions/15696526/ssl-throwing-error-185090050-while-authentication-via-oauth

the httplib2 library is having trouble accessing the certificate file.
This appears a bug involved with the pip installer and root
permissions:

https://code.google.com/p/httplib2/issues/detail?id=292


In your case, since your httplib2 is installed in:

/usr/lib/python2.7/site-packages/httplib2-0.9-py2.7.egg/httplib2/

I would recommend checking whether the 'cacerts.txt' file in that
subdirectory is user-readable or not.  Make sure it's readable.  If it
isn't, chmod it and try again: that will probably fix it.


If you do a few more searches, you might run into two dubious recommendations:

   1.  Run as root.
   2.  Disable ssl certficiate validation.

Both of these recommendations look potentially dangerous to me.  Don't
do either of these unless you really know what you're doing.

At the very least, you might try #1 just to see if you see the same
error message: if you do not see that error message when running as
the superuser, then that almost certainly means that the cause is
permission access to the cacerts.txt file.  The fix, then, should be:
correct the permission of that file.  Try not to run programs as
superuser if you can help it.
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor


[Tutor] python ssl error

2014-08-17 Thread Matthew Ngaha
Hi this might not be the correct place to ask this. I am using the
google api and as soon as I use the build function:

service = build('books', 'v1', developerKey=api_key)

I get an SSL error. I'm not sure what build() does but it triggers an
SSL error. Here's the error message:

 ssl.SSLError: [Errno 185090050] _ssl.c:357: error:0B084002:x509
certificate routines:X509_load_cert_crl_file:system lib

I googled this error but I don't understand the solution. It seems
specific to httplib2:

   https://github.com/kennethreitz/requests/issues/557


Here is the full trace back. Any ideas?

http://bpaste.net/show/isukkSeo08a0rx23ziBD/
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor