Help needed cause exception when searching youtube

Hello there,

I get an exception when searching for sth. on youtube. There was a similar post at https://github.com/mopidy/mopidy-youtube/issues/53 - but unfortunately I don’t understand the solution.

Do you have any idea?

2016-03-14 20:15:29,659 INFO [568:YouTubeBackend-6] mopidy_youtube: Searching YouTube for query 'test'
2016-03-14 20:15:29,669 INFO [568:YouTubeBackend-6] requests.packages.urllib3.connectionpool: Starting new HTTPS connection (4): www.googleapis.com
2016-03-14 20:15:29,853 ERROR [568:Core-13] mopidy.core.library: YouTubeBackend backend caused an exception.
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/mopidy/core/library.py", line 19, in _backend_error_handling
    yield
  File "/usr/lib/python2.7/dist-packages/mopidy/core/library.py", line 344, in search
    for backend, future in futures.items():
  File "/usr/lib/python2.7/dist-packages/pykka/threading.py", line 52, in get
    compat.reraise(*self._data['exc_info'])
  File "/usr/lib/python2.7/dist-packages/pykka/compat.py", line 12, in reraise
    exec('raise tp, value, tb')
  File "/usr/lib/python2.7/dist-packages/pykka/actor.py", line 201, in _actor_loop
    response = self._handle_receive(message)
  File "/usr/lib/python2.7/dist-packages/pykka/actor.py", line 295, in _handle_receive
    return callee(*message['args'], **message['kwargs'])
  File "/usr/local/lib/python2.7/dist-packages/mopidy_youtube/backend.py", line 184, in search
    uri=search_uri,
  File "/usr/local/lib/python2.7/dist-packages/mopidy_youtube/backend.py", line 90, in search_youtube
    def search_youtube(q):
  File "/usr/local/lib/python2.7/dist-packages/requests/sessions.py", line 480, in get
    return self.request('GET', url, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/requests/sessions.py", line 468, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/local/lib/python2.7/dist-packages/requests/sessions.py", line 576, in send
    r = adapter.send(request, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/requests/adapters.py", line 433, in send

SSLError: ("bad handshake: Error([('SSL routines', 'SSL3_GET_SERVER_CERTIFICATE', 'certificate verify failed')],)",)

Best regards
samtrot
`

Hi!, I’m having the same issue. I think the solution is about which version of the ‘requests’ package is installed in the system, but I have updated it using pip and still having the problem. ¿Is there any recommended version?

In addition, this problem in youtube search makes mopidy returning no results at all from any extension. There is no problem when the search is limited to another extensions (let’s say only spotify for example), but not every client allows to do that. IMHO, Mopidy should isolate the extension search results just in case something wrong happens with any of them, like in this case.

Any idea from developer’s side?