tvshowtime / tvshowtime-plex-scrobbler

This scrobbler sends episodes you watch on your Plex Media Center to TVShow Time
MIT License
64 stars 16 forks source link

error msg [SSL: CERTIFICATE_VERIFY_FAILED] when execute plex-tvst-scrobbler.py script #3

Closed hal9174 closed 9 years ago

hal9174 commented 9 years ago

python plex-tvst-scrobbler.py

== Requesting tvshowtime.com auth == Traceback (most recent call last): File "plex-tvst-scrobbler.py", line 98, in tvst.tvst_auth() File "/share/CACHEDEV1_DATA/.qpkg/Python/lib/python2.7/site-packages/plex_tvst_scrobbler/tvst.py", line 100, in tvst_auth auth_infos = self._get_auth_infos() File "/share/CACHEDEV1_DATA/.qpkg/Python/lib/python2.7/site-packages/plex_tvst_scrobbler/tvst.py", line 56, in _get_auth_infos res = self._do_tvst_post(url, urllib.urlencode(args)) File "/share/CACHEDEV1_DATA/.qpkg/Python/lib/python2.7/site-packages/plex_tvst_scrobbler/tvst.py", line 40, in _do_tvst_post res = urllib2.urlopen(f, data) File "/share/CACHEDEV1_DATA/.qpkg/Python/lib/python2.7/urllib2.py", line 154, in urlopen return opener.open(url, data, timeout) File "/share/CACHEDEV1_DATA/.qpkg/Python/lib/python2.7/urllib2.py", line 431, in open response = self._open(req, data) File "/share/CACHEDEV1_DATA/.qpkg/Python/lib/python2.7/urllib2.py", line 449, in _open '_open', req) File "/share/CACHEDEV1_DATA/.qpkg/Python/lib/python2.7/urllib2.py", line 409, in _call_chain result = func(*args) File "/share/CACHEDEV1_DATA/.qpkg/Python/lib/python2.7/urllib2.py", line 1240, in https_open context=self._context) File "/share/CACHEDEV1_DATA/.qpkg/Python/lib/python2.7/urllib2.py", line 1197, in do_open raise URLError(err) urllib2.URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:581)>

hal9174 commented 9 years ago

Anyone knows why I get this error when I execute the script? please help me

hal9174 commented 9 years ago

help me please

hal9174 commented 9 years ago

finally I solved myself this error but now I have another another one : this time in log file (see in issue list) please help me!

hal9174 commented 9 years ago

If you have this error msg [SSL: CERTIFICATE_VERIFY_FAILED]
here is the solution :

  1. edit plex_tvst_scrobbler/tvst.py file
  2. add line import ssl at the top
  3. in _do_tvst_post() function add just after the line try: add line context = ssl._create_unverified_context()
  4. in the line just below change to res = urllib2.urlopen(f, data, context=context)
  5. run python setup.py install the changes to take effect