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

TypeError in yandex music extractor #10193

Closed
weeshy opened this issue Jul 30, 2016 · 3 comments
Closed

TypeError in yandex music extractor #10193

weeshy opened this issue Jul 30, 2016 · 3 comments

Comments

@weeshy
Copy link

@weeshy weeshy commented Jul 30, 2016

youtube-dl --version is 2016.07.22, but related file https://github.com/rg3/youtube-dl/commits/master/youtube_dl/extractor/yandexmusic.py was modified before that date.


  • At least skimmed through README and most notably FAQ and BUGS sections
  • Searched the bugtracker for similar issues including closed ones

What is the purpose of your issue?

  • Bug report (encountered problems with youtube-dl)
  • Site support request (request for adding support for a new site)
  • Feature request (request for a new functionality)
  • Question
  • Other

The issue is that youtube-dl exits with TypeError in yandex music extractor:

youtube-dl https://music.yandex.ru/album/1613116
[yandexmusic:album] 1613116: Downloading album JSON
[download] Downloading playlist: Abney Park - Ancient World (2012)
[yandexmusic:album] playlist Abney Park - Ancient World (2012): Collected 15 video ids (downloading 15 of them)
[download] Downloading video 1 of 15
[yandexmusic:track] 14721249: Downloading track JSON
[yandexmusic:track] 14721249: Downloading track location JSON
Traceback (most recent call last):
  File "/usr/lib/python-exec/python2.7/youtube-dl", line 9, in <module>
    load_entry_point('youtube-dl==2016.7.22', 'console_scripts', 'youtube-dl')()
  File "/usr/lib64/python2.7/site-packages/youtube_dl/__init__.py", line 422, in main
    _real_main(argv)
  File "/usr/lib64/python2.7/site-packages/youtube_dl/__init__.py", line 412, in _real_main
    retcode = ydl.download(all_urls)
  File "/usr/lib64/python2.7/site-packages/youtube_dl/YoutubeDL.py", line 1775, in download
    url, force_generic_extractor=self.params.get('force_generic_extractor', False))
  File "/usr/lib64/python2.7/site-packages/youtube_dl/YoutubeDL.py", line 693, in extract_info
    return self.process_ie_result(ie_result, download, extra_info)
  File "/usr/lib64/python2.7/site-packages/youtube_dl/YoutubeDL.py", line 854, in process_ie_result
    extra_info=extra)
  File "/usr/lib64/python2.7/site-packages/youtube_dl/YoutubeDL.py", line 746, in process_ie_result
    extra_info=extra_info)
  File "/usr/lib64/python2.7/site-packages/youtube_dl/YoutubeDL.py", line 682, in extract_info
    ie_result = ie.extract(url)
  File "/usr/lib64/python2.7/site-packages/youtube_dl/extractor/common.py", line 347, in extract
    return self._real_extract(url)
  File "/usr/lib64/python2.7/site-packages/youtube_dl/extractor/yandexmusic.py", line 138, in _real_extract
    return self._get_track_info(track)
  File "/usr/lib64/python2.7/site-packages/youtube_dl/extractor/yandexmusic.py", line 96, in _get_track_info
    'url': self._get_track_url(track['storageDir'], track['id']),
  File "/usr/lib64/python2.7/site-packages/youtube_dl/extractor/yandexmusic.py", line 78, in _get_track_url
    key = hashlib.md5(('XGRlBW9FXlekgbPrRHuSiA' + data['path'][1:] + data['s']).encode('utf-8')).hexdigest()
TypeError: coercing to Unicode: need string or buffer, list found
@dstftw dstftw closed this in cf03e34 Jul 31, 2016
@weeshy
Copy link
Author

@weeshy weeshy commented Jul 31, 2016

There is an empty list under youtube-dl https://music.yandex.ru/album/1456657

It gives another Type Error now:

  File "/usr/lib64/python2.7/site-packages/youtube_dl/extractor/yandexmusic.py", line 88, in _get_track_url
    % (data['host'], key, data['ts'] + data['path'], storage[1]))
TypeError: unsupported operand type(s) for +: 'NoneType' and 'unicode'
@yan12125
Copy link
Collaborator

@yan12125 yan12125 commented Jul 31, 2016

@weeshy Please post the full verbose log of the command youtube-dl -v https://music.yandex.ru/album/1456657

@weeshy
Copy link
Author

@weeshy weeshy commented Jul 31, 2016

I tried to reproduce the error and inserted debugging print() class, but suddenly all become nice again.

@dstftw dstftw mentioned this issue Aug 1, 2016
4 of 8 tasks complete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.