natumbri / mopidy-youtube

Mopidy extension for playing music from YouTube
Apache License 2.0
256 stars 75 forks source link

SSL3 certificate verify failed (after update) #54

Closed HawkingJan closed 8 years ago

HawkingJan commented 8 years ago

Hi,

I'm using modipy (Version 1.1.2) on a RaspberryPi (Raspbian Jessie) and trying to get with mopidy-youtube to work.

If I use the Mopidy-MusicBox-Webclient - Search - Select Youtube and search e.g. for "test" (or yt: test) I found some results but also got several Unable to download webpage: <urlopen error [Errno -2] Name or service not known> in the syslog. As I was wondering what this is about I updated sudo pip install --upgrade pafy sudo pip install --upgrade Mopidy-YouTube sudo pip install --upgrade Mopidy-MusicBox-Webclient sudo pip install --upgrade youtube_dl and restarted.

Now I get no results at all but

mopidy[464]: INFO     Searching YouTube for query 'test'
mopidy[464]: ERROR    YouTubeBackend backend caused an exception.
mopidy[464]: Traceback (most recent call last):
mopidy[464]: File "/usr/lib/python2.7/dist-packages/mopidy/core/library.py", line 19, in _backend_error_handling
mopidy[464]: yield
mopidy[464]: File "/usr/lib/python2.7/dist-packages/mopidy/core/library.py", line 344, in search
mopidy[464]: result = future.get()
mopidy[464]: File "/usr/lib/python2.7/dist-packages/pykka/threading.py", line 52, in get
mopidy[464]: compat.reraise(*self._data['exc_info'])
mopidy[464]: File "/usr/lib/python2.7/dist-packages/pykka/compat.py", line 12, in reraise
mopidy[464]: exec('raise tp, value, tb')
mopidy[464]: File "/usr/lib/python2.7/dist-packages/pykka/actor.py", line 201, in _actor_loop
mopidy[464]: response = self._handle_receive(message)
mopidy[464]: File "/usr/lib/python2.7/dist-packages/pykka/actor.py", line 295, in _handle_receive
mopidy[464]: return callee(*message['args'], **message['kwargs'])
mopidy[464]: File "/usr/local/lib/python2.7/dist-packages/mopidy_youtube/backend.py", line 192, in search
mopidy[464]: tracks=search_youtube(search_query)
mopidy[464]: File "/usr/local/lib/python2.7/dist-packages/mopidy_youtube/backend.py", line 98, in search_youtube
mopidy[464]: result = session.get(yt_api_endpoint+'search', params=query)
mopidy[464]: File "/usr/local/lib/python2.7/dist-packages/requests/sessions.py", line 480, in get
mopidy[464]: return self.request('GET', url, **kwargs)
mopidy[464]: File "/usr/local/lib/python2.7/dist-packages/requests/sessions.py", line 468, in request
mopidy[464]: resp = self.send(prep, **send_kwargs)
mopidy[464]: File "/usr/local/lib/python2.7/dist-packages/requests/sessions.py", line 576, in send
mopidy[464]: r = adapter.send(request, **kwargs)
mopidy[464]: File "/usr/local/lib/python2.7/dist-packages/requests/adapters.py", line 447, in send
mopidy[464]: raise SSLError(e, request=request)
mopidy[464]: SSLError: ("bad handshake: Error([('SSL routines', 'SSL3_GET_SERVER_CERTIFICATE', 'certificate verify failed')],)",)

Also running sudo update-ca-certificates didn't help... In general my internet connection works. Listening to webstreams via MusicBox e.g. works without problems and I can also play Videos at https://www.youtube.com/ using the regular web browser of Jessie). I hope that you can help me to figure out what is wrong.

HawkingJan commented 8 years ago

The error still exists after I updated to mopidy 2.0. Any help is appreciated.

jcass77 commented 8 years ago

I'm not near my Pi to test this right now, but I've had issues with certain versions of certifi.

You could perhaps try downgrading to an older version by running pip install certifi==2015.4.28 to see if that makes a difference?

martinanton commented 8 years ago

good morning:) thanks a lot:) ...certifi-2015.4.28 does function and searching with webclient works