Using Youtube's Python API ProgrammaticLogin() gives SSL Error Python 2.7.9 -
edit: turns out i'm idiot , can't read looked up, fix brew uninstall openssl
rm -rf /usr/local/openssl
, run brew install openssl
there's issue openssl installed before os x 10.10.3 , reinstalling fixes it.
i'm trying create reddit bot searches specified users on youtube, , submits posts subreddit. when tries log in gives ssl error.
i'm on python 2.7.9, , installed gdata through pip.
here's code:
import gdata.youtube import gdata.youtube.service import praw def main(): yt_service = gdata.youtube.service.youtubeservice() yt_service.ssl = true yt_service.email = '' yt_service.password = '' yt_service.source = 'reddit-youtube-submitter-bot' yt_service.programmaticlogin() if __name__ == "__main__": main()
here's error:
traceback (most recent call last): file "youtube_submitter_bot_mine.py", line 15, in <module> main() file "youtube_submitter_bot_mine.py", line 12, in main yt_service.programmaticlogin() file "/usr/local/lib/python2.7/site-packages/gdata/service.py", line 771, in programmaticlogin headers={'content-type':'application/x-www-form-urlencoded'}) file "/usr/local/lib/python2.7/site-packages/atom/http.py", line 163, in request connection.endheaders() file "/usr/local/cellar/python/2.7.9/frameworks/python.framework/versions/2.7/lib/python2.7/httplib.py", line 997, in endheaders self._send_output(message_body) file "/usr/local/cellar/python/2.7.9/frameworks/python.framework/versions/2.7/lib/python2.7/httplib.py", line 850, in _send_output self.send(msg) file "/usr/local/cellar/python/2.7.9/frameworks/python.framework/versions/2.7/lib/python2.7/httplib.py", line 812, in send self.connect() file "/usr/local/cellar/python/2.7.9/frameworks/python.framework/versions/2.7/lib/python2.7/httplib.py", line 1212, in connect server_hostname=server_hostname) file "/usr/local/cellar/python/2.7.9/frameworks/python.framework/versions/2.7/lib/python2.7/ssl.py", line 350, in wrap_socket _context=self) file "/usr/local/cellar/python/2.7.9/frameworks/python.framework/versions/2.7/lib/python2.7/ssl.py", line 566, in __init__ self.do_handshake() file "/usr/local/cellar/python/2.7.9/frameworks/python.framework/versions/2.7/lib/python2.7/ssl.py", line 788, in do_handshake self._sslobj.do_handshake() ssl.sslerror: [ssl: certificate_verify_failed] certificate verify failed (_ssl.c:581)
Comments
Post a Comment