YouTube no search results


#1

Hey,

today I’ve flashed and run Pi MusicBox 0.7.0RC5 on my RPI 3. However, youtube searching is not working. “No tracks found” all the time.

After checking some logs at /var/log/mopidy/mopidy.log it turned out something is wrong. here it is:

Maybe it’s because of some latest changes in youtube API?https://developers.google.com/youtube/v3/revision_history#august-29-2017

2017-07-27 23:49:58,919 - ERROR    YouTubeBackend backend caused an exception.
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/mopidy/core/library.py", line 19, in _backend_error_handling
yield
  File "/usr/local/lib/python2.7/dist-packages/mopidy/core/library.py", line 344, in search
    result = future.get()
  File "/usr/local/lib/python2.7/dist-packages/pykka/threading.py", line 52, in get
    compat.reraise(*self._data['exc_info'])
  File "/usr/local/lib/python2.7/dist-packages/pykka/compat.py", line 12, in reraise
    exec('raise tp, value, tb')
  File "/usr/local/lib/python2.7/dist-packages/pykka/actor.py", line 201, in _actor_loop
    response = self._handle_receive(message)
  File "/usr/local/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 192, in search
    tracks=search_youtube(search_query)
  File "/usr/local/lib/python2.7/dist-packages/mopidy_youtube/backend.py", line 98, in search_youtube
    result = session.get(yt_api_endpoint+'search', params=query)
  File "/usr/local/lib/python2.7/dist-packages/requests/sessions.py", line 515, in get
    return self.request('GET', url, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/requests/sessions.py", line 502, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/local/lib/python2.7/dist-packages/requests/sessions.py", line 612, in send
    r = adapter.send(request, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/requests/adapters.py", line 504, in send
    raise ConnectionError(e, request=request)
ConnectionError: HTTPSConnectionPool(host='www.googleapis.com', port=443): Max retries exceeded with url: 
/youtube/v3/search?
q=acdc&part=id&type=video&key=AIzaSyAl1Xq9DwdE_KD4AtPaE4EJl3WZe2zCqg4&maxResults=15 (Caused by 
SSLError(SSLErro$

Has anyone encountered such a problem?


#2

I have this problem too. I have installed MusicBox and a version 1 pi, and most things seem to work OK, but any search on youtube returns no results.

Have you found a solution to this problem?


#3

None of those API changes look relevant to what mopidy-youtube uses. I can’t reproduce this.

2018-01-11 16:50:15,035 INFO [4554:YouTubeBackend-7] mopidy_youtube: Searching YouTube for query 'acdc'
2018-01-11 16:50:15,249 DEBUG [4554:YouTubeBackend-7] urllib3.connectionpool: https://www.googleapis.com:443 "GET /youtube/v3/search?q=acdc&part=id&type=video&key=AIzaSyAl1Xq9DwdE_KD4AtPaE4EJl3WZe2zCqg4&maxResults=15 HTTP/1.1" 200 None
2018-01-11 16:50:32,195 DEBUG [4554:HttpServer] mopidy.http.handlers: Sent WebSocket message to 172.22.0.55: '{"jsonrpc": "2.0", "id": 20, "result": [{"__model__": "SearchResult", "tracks": [{"album": {"images": ["http://i.ytimg.com/vi/v2AC41dglnM/hqdefault.jpg", "http://i.ytimg.com/vi/v2AC41dglnM/mqdefault.jpg"], "__model__": "Album", "name": "YouTube"}, "comment": "v2AC41dglnM", "__model__": "Track", "name": "AC/DC - Thunderstruck (Official Video)", "uri": "youtube:video/ACDC - Thunderstruck (Official Video).v2AC41dglnM", "length": 292000}, {"album": {"images": ["http://i.ytimg.com/vi/pAgnJDJN4VA/hqdefault.jpg", "http://i.ytimg.com/vi/pAgnJDJN4VA/mqdefault.jpg"], "__model__": "Album", "name": "YouTube"}, "comment": "pAgnJDJN4VA", "__model__": "Track", "name": "AC/DC - Back In Black (Official Video)", "uri": "youtube:video/ACDC - Back In Black (Official Video).pAgnJDJN4VA", "length": 255000}, {"album": {"images": ["http://i.ytimg.com/vi/gEPmA3USJdI/mqdefault.jpg", "http://i.ytimg.com/vi/gEPmA3USJdI/hqdefault.jpg"], "__model__": "Album", "name": "YouTube"}, "comment": "gEPmA3USJdI", "__model__": "Track", "name": "AC/DC - Highway to Hell (from Live at River Plate)", "uri": "youtube:video/ACDC - Highway to Hell (from Live at River Plate).gEPmA3USJdI", "length": 284000}, {"album": {"images": ["http://i.ytimg.com/vi/3f2g4RMfhS0/mqdefault.jpg", "http://i.ytimg.com/vi/3f2g4RMfhS0/hqdefault.jpg"], "__model__": "Album", "name": "YouTube"}, "comment": "3f2g4RMfhS0", "__model__": "Track", "name": "AC/DC - Let There Be Rock (Official Video)", "uri": "youtube:video/ACDC - Let There Be Rock (Official Video).3f2g4RMfhS0", "length": 369000}, {"album": {"images": ["http://i.ytimg.com/vi/S7FWA-WKlY0/mqdefault.jpg", "http://i.ytimg.com/vi/S7FWA-WKlY0/hqdefault.jpg"], "__model__": "Album", "name": "YouTube"}, "comment": "S7FWA-WKlY0", "__model__": "Track", "name": "AC DC live at Munich 2001 FULL concert", "uri": "youtube:video/AC DC live at Munich 2001 FULL concert.S7FWA-WKlY0", "length": 7657000}, {"album": {"images": ["http://i.ytimg.com/vi/Lo2qQmj0_h4/mqdefault.jpg", "http://i.ytimg.com/vi/Lo2qQmj0_h4/hqdefault.jpg"], "__model__": "Album", "name": "YouTube"}, "comment": "Lo2qQmj0_h4", "__model__": "Track", "name": "AC/DC - You Shook Me All Night Long (Official Video)", "uri": "youtube:video/ACDC - You Shook Me All Night Long (Official Video).Lo2qQmj0_h4", "length": 210000}, {"album": {"images": ["http://i.ytimg.com/vi/QMvE0yFnR0I/hqdefault.jpg", "http://i.ytimg.com/vi/QMvE0yFnR0I/mqdefault.jpg"], "__model__": "Album", "name": "YouTube"}, "comment": "QMvE0yFnR0I", "__model__": "Track", "name": "AC/DC - Whole Lotta Rosie (from Live at River Plate)", "uri": "youtube:video/ACDC - Whole Lotta Rosie (from Live at River Plate).QMvE0yFnR0I", "length": 342000}, {"album": {"images": ["http://i.ytimg.com/vi/n_GFN3a0yj0/mqdefault.jpg", "http://i.ytimg.com/vi/n_GFN3a0yj0/hqdefault.jpg"], "__model__": "Album", "name": "YouTube"}, "comment": "n_GFN3a0yj0", "__model__": "Track", "name": "AC/DC - Thunderstruck (from Live at River Plate)", "uri": "youtube:video/ACDC - Thunderstruck (from Live at River Plate).n_GFN3a0yj0", "length": 320000}, {"album": {"images": ["http://i.ytimg.com/vi/O24AipZ-buQ/mqdefault.jpg", "http://i.ytimg.com/vi/O24AipZ-buQ/hqdefault.jpg"], "__model__": "Album", "name": "YouTube"}, "comment": "O24AipZ-buQ", "__model__": "Track", "name": "AC/DC - Let There Be Rock (from Live at River Plate)", "uri": "youtube:video/ACDC - Let There Be Rock (from Live at River Plate).O24AipZ-buQ", "length": 1066000}, {"album": {"images": ["http://i.ytimg.com/vi/l482T0yNkeo/hqdefault.jpg", "http://i.ytimg.com/vi/l482T0yNkeo/mqdefault.jpg"], "__model__": "Album", "name": "YouTube"}, "comment": "l482T0yNkeo", "__model__": "Track", "name": "AC/DC - Highway to Hell (Official Video)", "uri": "youtube:video/ACDC - Highway to Hell (Official Video).l482T0yNkeo", "length": 207000}, {"album": {"images": ["http://i.ytimg.com/vi/44XYEeD1A1U/hqdefault.jpg", "http://i.ytimg.com/vi/44XYEeD1A1U/mqdefault.jpg"], "__model__": "Album", "name": "YouTube"}, "comment": "44XYEeD1A1U", "__model__": "Track", "name": "AC/DC - T.N.T. (from Live at River Plate)", "uri": "youtube:video/ACDC - T.N.T. (from Live at River Plate).44XYEeD1A1U", "length": 230000}, {"album": {"images": ["http://i.ytimg.com/vi/etAIpkdhU9Q/hqdefault.jpg", "http://i.ytimg.com/vi/etAIpkdhU9Q/mqdefault.jpg"], "__model__": "Album", "name": "YouTube"}, "comment": "etAIpkdhU9Q", "__model__": "Track", "name": "AC/DC - Hells Bells (Official Video)", "uri": "youtube:video/ACDC - Hells Bells (Official Video).etAIpkdhU9Q", "length": 311000}, {"album": {"images": ["http://i.ytimg.com/vi/JGftIcp2SC0/hqdefault.jpg", "http://i.ytimg.com/vi/JGftIcp2SC0/mqdefault.jpg"], "__model__": "Album", "name": "YouTube"}, "comment": "JGftIcp2SC0", "__model__": "Track", "name": "AC/DC - Touch Too Much (Official Video)", "uri": "youtube:video/ACDC - Touch Too Much (Official Video).JGftIcp2SC0", "length": 267000}, {"album": {"images": ["http://i.ytimg.com/vi/zakKvbIQ28o/mqdefault.jpg", "http://i.ytimg.com/vi/zakKvbIQ28o/hqdefault.jpg"], "__model__": "Album", "name": "YouTube"}, "comment": "zakKvbIQ28o", "__model__": "Track", "name": "AC/DC - You Shook Me All Night Long (from Live at River Plate)", "uri": "youtube:video/ACDC - You Shook Me All Night Long (from Live at River Plate).zakKvbIQ28o", "length": 265000}, {"album": {"images": ["http://i.ytimg.com/vi/xRQnJyP77tY/hqdefault.jpg", "http://i.ytimg.com/vi/xRQnJyP77tY/mqdefault.jpg"], "__model__": "Album", "name": "YouTube"}, "comment": "xRQnJyP77tY", "__model__": "Track", "name": "AC/DC - Shoot To Thrill (Iron Man 2 Version)", "uri": "youtube:video/ACDC - Shoot To Thrill (Iron Man 2 Version).xRQnJyP77tY", "length": 333000}], "uri": "youtube:search"}]}'

Is it possible to get the rest of the error message?

@Vincent_Bodsworth Do you see the same SSL error message in your log? Want to try running:

apt-get update && apt-get install gcc python-dev libffi-dev
pip install -U 'requests[security]'

#4

Hey,

no solution after tons of searching, I’ve abandoned this project because of
that.


#5

Everything else I have tried works OK, and I find the system fine for playing radio stations, which is my main requirement. So I will take out the You Tube function for now, and return to it if I have spare time.


#6

OK, when someone can help debugging we can try and fix this.