Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

keyerror dashmpd #861

Closed
kirotawa opened this issue Jul 5, 2018 · 2 comments
Closed

keyerror dashmpd #861

kirotawa opened this issue Jul 5, 2018 · 2 comments

Comments

@kirotawa
Copy link

kirotawa commented Jul 5, 2018

Hi,

I'm using this version:

mpsyt version : 0.2.5
notes : released 1 June 2015
pafy version : 0.3.80
Python version : 3.5.2 (default, Nov 23 2017, 16:37:01)
[GCC 5.4.0 20160609]
Processor : x86_64
Machine type : x86_64
Architecture : 64bit, ELF
Platform : Linux-4.13.0-45-generic-x86_64-with-Ubuntu-16.04-xenial

and I did get this exceptions error:

Traceback (most recent call last):
File "/usr/bin/mpsyt", line 9, in
load_entry_point('mps-youtube==0.2.5', 'console_scripts', 'mpsyt')()
File "/usr/lib/python3/dist-packages/mps_youtube/main.py", line 4780, in main
if matchfunction(k, v, userinput):
File "/usr/lib/python3/dist-packages/mps_youtube/main.py", line 4680, in matchfunction
func(*matches)
File "/usr/lib/python3/dist-packages/mps_youtube/main.py", line 3450, in play
play_range(songlist, shuffle, repeat, override)
File "/usr/lib/python3/dist-packages/mps_youtube/main.py", line 3543, in play_range
returncode = playsong(song, override=override)
File "/usr/lib/python3/dist-packages/mps_youtube/main.py", line 2104, in playsong
get_streams(song, force=failcount, callback=writestatus)
File "/usr/lib/python3/dist-packages/mps_youtube/main.py", line 345, in get_streams
p = get_pafy(vid, force=force, callback=callback)
File "/usr/lib/python3/dist-packages/mps_youtube/main.py", line 314, in get_pafy
p = pafy.new(item.ytid, callback=callback_fn)
File "/usr/lib/python3/dist-packages/pafy/pafy.py", line 148, in new
return Pafy(url, basic, gdata, signature, size, callback)
File "/usr/lib/python3/dist-packages/pafy/pafy.py", line 866, in init
self.fetch_basic()
File "/usr/lib/python3/dist-packages/pafy/pafy.py", line 892, in fetch_basic
smaps, js_url, mainfunc, dashurl = get_js_sm(self.videoid)
File "/usr/lib/python3/dist-packages/pafy/pafy.py", line 481, in get_js_sm
dash_url = stream_info['dashmpd']
KeyError: 'dashmpd'
Exception in thread Thread-3:
Traceback (most recent call last):
File "/usr/lib/python3.5/threading.py", line 914, in _bootstrap_inner
self.run()
File "/usr/lib/python3.5/threading.py", line 862, in run
self._target(*self._args, **self._kwargs)
File "/usr/lib/python3/dist-packages/mps_youtube/main.py", line 3497, in preload
stream = get_streams(song)
File "/usr/lib/python3/dist-packages/mps_youtube/main.py", line 345, in get_streams
p = get_pafy(vid, force=force, callback=callback)
File "/usr/lib/python3/dist-packages/mps_youtube/main.py", line 314, in get_pafy
p = pafy.new(item.ytid, callback=callback_fn)
File "/usr/lib/python3/dist-packages/pafy/pafy.py", line 148, in new
return Pafy(url, basic, gdata, signature, size, callback)
File "/usr/lib/python3/dist-packages/pafy/pafy.py", line 866, in init
self.fetch_basic()
File "/usr/lib/python3/dist-packages/pafy/pafy.py", line 892, in fetch_basic
smaps, js_url, mainfunc, dashurl = get_js_sm(self.videoid)
File "/usr/lib/python3/dist-packages/pafy/pafy.py", line 481, in get_js_sm
dash_url = stream_info['dashmpd']
KeyError: 'dashmpd'

Ways to reproduce:

  1. Just open it and type a string for search, such as: > search sylvan esso
    and you'll see the errors message.
@vn-ki
Copy link
Member

vn-ki commented Jul 6, 2018

Please update your install. The current version is 0.2.8.

Use pip instead of your distro package manager to install.

sudo apt purge mps-youtube  # You can use remove too. Purge removes the config files too
pip install --user mps-youtube

@ritiek
Copy link
Member

ritiek commented Aug 20, 2018

Yep, this is most likely to do with outdated mps-youtube, pafy or youtube-dl. Also see #475.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants