Search code examples
pythonsslpraw

SSLError with PRAW?


I'm trying to get started with PRAW but I'm having issues using login().

I have the following piece of code:

import praw

r = praw.Reddit('This is a test bot')
r.login('myRedditUsername','password')

And I get the following error:

requests.exceptions.SSLError: [Errno 1] _ssl.c:503: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed

Is there a way around this outside of disabling SSL?


Solution

  • According to praw SSLError during login from shared hosting:

    It appears that your host doesn't have the proper SSL certificates installed. You can disable using SSL (not recommended) by adding

    r.config._ssl_url = None
    

    after you create the PRAW object.