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

Crash when listing subtitles of a youtube video which has none #1213

Closed
daureg opened this issue Aug 8, 2013 · 2 comments
Closed

Crash when listing subtitles of a youtube video which has none #1213

daureg opened this issue Aug 8, 2013 · 2 comments
Labels
bug

Comments

@daureg
Copy link

@daureg daureg commented Aug 8, 2013

On Linux x64 with python 3.3, I get the following error when checking available subtitles of a video without it:

[debug] System config: []
[debug] User config: []
[debug] Command-line args: ['--verbose', '--list-subs', 'http://www.youtube.com/watch?v=sAjKT8FhjI8']
[debug] youtube-dl version 2013.08.08
[debug] Git HEAD: 67fb0c5
[debug] Python version 3.3.2 - Linux-3.10.5-1-ARCH-x86_64-with-arch
[debug] Proxy map: {}
[youtube] Setting language
[youtube] sAjKT8FhjI8: Downloading video webpage
[youtube] sAjKT8FhjI8: Downloading video info webpage
[youtube] sAjKT8FhjI8: Extracting video information
[youtube] sAjKT8FhjI8: Checking available subtitles
Traceback (most recent call last):
  File "/usr/lib/python3.3/runpy.py", line 160, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/usr/lib/python3.3/runpy.py", line 73, in _run_code
    exec(code, run_globals)
  File "./youtube_dl/__main__.py", line 18, in <module>
    youtube_dl.main()
  File "./youtube_dl/__init__.py", line 639, in main
    _real_main(argv)
  File "./youtube_dl/__init__.py", line 623, in _real_main
    retcode = ydl.download(all_urls)
  File "./youtube_dl/YoutubeDL.py", line 573, in download
    videos = self.extract_info(url)
  File "./youtube_dl/YoutubeDL.py", line 312, in extract_info
    ie_result = ie.extract(url)
  File "./youtube_dl/extractor/common.py", line 96, in extract
    return self._real_extract(url)
  File "./youtube_dl/extractor/youtube.py", line 677, in _real_extract
    self._list_available_subtitles(video_id)
  File "./youtube_dl/extractor/youtube.py", line 385, in _list_available_subtitles
    self.report_video_subtitles_available(video_id, sub_lang_list)
  File "./youtube_dl/extractor/youtube.py", line 316, in report_video_subtitles_available
    sub_lang = ",".join(list(sub_lang_list.keys()))
AttributeError: 'tuple' object has no attribute 'keys'
@phihag
Copy link
Contributor

@phihag phihag commented Aug 9, 2013

We should check who is setting the list of subtitles to a tuple instead of a dictionary.

@jaimeMF
Copy link
Collaborator

@jaimeMF jaimeMF commented Aug 27, 2013

This has been fixed with #937.

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
3 participants
You can’t perform that action at this time.