mps-youtube / yewtube

yewtube, forked from mps-youtube , is a Terminal based YouTube player and downloader. No Youtube API key required.
GNU General Public License v3.0
8.01k stars 643 forks source link

Playback completely fails, exits mpsyt #212

Closed rossmounce closed 9 years ago

rossmounce commented 9 years ago
$ mpsyt --debug

mpsyt version  : 0.2.1 
pafy version   : 0.3.41
Python version : 2.7.8 (default, Oct 20 2014, 15:05:19) 
[GCC 4.9.1]
Processor      : x86_64
Machine type   : x86_64
Architecture   : 64bit, ELF
Platform       : Linux-3.16.0-30-generic-x86_64-with-Ubuntu-14.10-utopic
sys.stdout.enc : UTF-8
default enc    : ascii
env:TERM       : xterm
env:SHELL      : /bin/bash
env:LANG       : en_GB.UTF-8
env:LANGUAGE   : en_GB:en
--

Enter /search-term to search or [h]elp
> /blur beetlebum
--

Searching for 'blur beetlebum'
--

Num  Title                                                                 Time
 1   Blur - Beetlebum                                                     05:04
 2   Blur - Beetlebum                                                     05:12
 3   Blur - Beetlebum Lyrics                                              05:04
 4   Blur (The Best Of) - Beetlebum                                       05:07
 5   Blur - Beetlebum [07] (Live at Hyde Park 2009)                       06:07
 6   Blur - Beetlebum (Jools Holland 1997)                                05:33
 7   Blur - Beetlebum (HD)                                                05:04
 8   Blur Beetlebum - Live 2009 - HD                                      06:07
 9   Blur - Beetlebum (Live Reading 1999)                                 06:04
10   Blur - Beetlebum                                                     05:09
11   Blur - Beetlebum                                                     05:06
12   Blur - Beetlebum Live @ BBC Hippodrome London '99                    05:47
13   Blur - Beetlebum (TOTP)                                              04:54
14   Blur - Beetlebum (Live Wembley 1999)                                 05:53
15   Blur - Beetlebum (Glastonbury Festival, 2009)                        05:40
16   [HD] BLUR ParkLive Part 05/25 - Beetlebum                            06:01
17   Blur - Beetlebum (Live Sen Kväll Med Luuk)                           03:58
18   Beetlebum (Blur) Easy Guitar Lesson How to Play Tutorial             17:28
19   Blur - Beetlebum (live Glastonbury)                                  05:48
20   Blur Beetlebum mishap at the Meltdown..                              03:25

Search results for blur beetlebum
> Exception in thread Thread-1:
Traceback (most recent call last):
  File "/usr/lib/python2.7/threading.py", line 810, in __bootstrap_inner
    self.run()
  File "/usr/lib/python2.7/threading.py", line 763, in run
    self.__target(*self.__args, **self.__kwargs)
  File "/usr/local/lib/python2.7/dist-packages/mps_youtube/main.py", line 2997, in preload
    stream = get_streams(song)
  File "/usr/local/lib/python2.7/dist-packages/mps_youtube/main.py", line 375, in get_streams
    x = dict(url=s.url,
  File "/usr/lib/python2.7/dist-packages/pafy.py", line 590, in url
    self._url = _make_url(self._rawurl, self._sig)
  File "/usr/lib/python2.7/dist-packages/pafy.py", line 67, in _make_url
    raw += "&signature=" + sig
TypeError: cannot concatenate 'str' and 'NoneType' objects

1
--

Num  Title                                                                 Time
 1   Blur - Beetlebum                                                     05:04
 2   Blur - Beetlebum                                                     05:12
 3   Blur - Beetlebum Lyrics                                              05:04
 4   Blur (The Best Of) - Beetlebum                                       05:07
 5   Blur - Beetlebum [07] (Live at Hyde Park 2009)                       06:07
 6   Blur - Beetlebum (Jools Holland 1997)                                05:33
 7   Blur - Beetlebum (HD)                                                05:04
 8   Blur Beetlebum - Live 2009 - HD                                      06:07
 9   Blur - Beetlebum (Live Reading 1999)                                 06:04
10   Blur - Beetlebum                                                     05:09
11   Blur - Beetlebum                                                     05:06
12   Blur - Beetlebum Live @ BBC Hippodrome London '99                    05:47
13   Blur - Beetlebum (TOTP)                                              04:54
14   Blur - Beetlebum (Live Wembley 1999)                                 05:53
15   Blur - Beetlebum (Glastonbury Festival, 2009)                        05:40
16   [HD] BLUR ParkLive Part 05/25 - Beetlebum                            06:01
17   Blur - Beetlebum (Live Sen Kväll Med Luuk)                           03:58
18   Beetlebum (Blur) Easy Guitar Lesson How to Play Tutorial             17:28
19   Blur - Beetlebum (live Glastonbury)                                  05:48
20   Blur Beetlebum mishap at the Meltdown..                              03:25

    [←] seek [→]       [9] volume [0]
    [↓] SEEK [↑]       [space] pause       [q] return    

    Blur - Beetlebum [05:04]
Traceback (most recent call last):                                          
  File "/usr/local/bin/mpsyt", line 11, in <module>
    sys.exit(main.main())
  File "/usr/local/lib/python2.7/dist-packages/mps_youtube/main.py", line 4246, in main
    if matchfunction(k, v, userinput):
  File "/usr/local/lib/python2.7/dist-packages/mps_youtube/main.py", line 4144, in matchfunction
    globals()[funcname](*matches)
  File "/usr/local/lib/python2.7/dist-packages/mps_youtube/main.py", line 2950, in play
    play_range(songlist, shuffle, repeat, override)
  File "/usr/local/lib/python2.7/dist-packages/mps_youtube/main.py", line 3042, in play_range
    playsong(song, override=override)
  File "/usr/local/lib/python2.7/dist-packages/mps_youtube/main.py", line 1895, in playsong
    get_streams(song, force=failcount, callback=writestatus)
  File "/usr/local/lib/python2.7/dist-packages/mps_youtube/main.py", line 375, in get_streams
    x = dict(url=s.url,
  File "/usr/lib/python2.7/dist-packages/pafy.py", line 590, in url
    self._url = _make_url(self._rawurl, self._sig)
  File "/usr/lib/python2.7/dist-packages/pafy.py", line 67, in _make_url
    raw += "&signature=" + sig
TypeError: cannot concatenate 'str' and 'NoneType' objects
Exception in thread Thread-2:
Traceback (most recent call last):
  File "/usr/lib/python2.7/threading.py", line 810, in __bootstrap_inner
    self.run()
  File "/usr/lib/python2.7/threading.py", line 763, in run
    self.__target(*self.__args, **self.__kwargs)
  File "/usr/local/lib/python2.7/dist-packages/mps_youtube/main.py", line 2997, in preload
    stream = get_streams(song)
  File "/usr/local/lib/python2.7/dist-packages/mps_youtube/main.py", line 375, in get_streams
    x = dict(url=s.url,
  File "/usr/lib/python2.7/dist-packages/pafy.py", line 590, in url
    self._url = _make_url(self._rawurl, self._sig)
  File "/usr/lib/python2.7/dist-packages/pafy.py", line 67, in _make_url
    raw += "&signature=" + sig
TypeError: cannot concatenate 'str' and 'NoneType' objects

$ [dumped out back to prompt]

$ tail -f /tmp/mpsyt.log DEBUG:root:transcoding config file exists DEBUG:root:searching path for ffmpeg DEBUG:root:searching path for avconv DEBUG:root:found at /usr/bin/avconv DEBUG:root:input: /blur beetlebum DEBUG:root:function call: search DEBUG:root:regx matches: ('blur beetlebum',) INFO:root:search for blur beetlebum DEBUG:root:Fetched video info DEBUG:root:preload: got new pafy object: Blur - Beetlebum DEBUG:root:preload: got new pafy object: l1kBlZ2T-9I DEBUG:root:*_Type Error in get_streams. Retrying DEBUG:root:Fetched video info DEBUG:root:preload: got new pafy object: Blur - Beetlebum DEBUG:root:preload: got new pafy object: l1kBlZ2T-9I DEBUG:root:input: 1 DEBUG:root:function call: play DEBUG:root:regx matches: ('', '1', '') DEBUG:root:searching path for mplayer DEBUG:root:found at /usr/bin/mplayer DEBUG:root:get pafy cache hit for Blur - Beetlebum DEBUG:root:*__Type Error in getstreams. Retrying DEBUG:root:Fetched video info DEBUG:root:got new pafy object: Blur - Beetlebum DEBUG:root:got new pafy object: l1kBlZ2T-9I DEBUG:root:Fetched video info DEBUG:root:preload: got new pafy object: Blur - Beetlebum DEBUG:root:preload: got new pafy object: WAXnqjUfal4 DEBUG:root:Type Error in get_streams. Retrying DEBUG:root:Fetched video info DEBUG:root:preload: got new pafy object: Blur - Beetlebum DEBUG:root:preload: got new pafy object: WAXnqjUfal4

rossmounce commented 9 years ago

bears similarity to a previous issue? https://github.com/np1/mps-youtube/issues/26

np1 commented 9 years ago

Hi, the version of pafy you are using is outdated. I expect it was installed from the Ubuntu repository. It should work if you install the current version (0.3.72)

sudo pip install pafy --upgrade

rossmounce commented 9 years ago
sudo apt-get remove python-pafy

did the trick. Thanks