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

Failure downloading transcript #8974

Closed
ferruccio opened this issue Mar 25, 2016 · 1 comment
Closed

Failure downloading transcript #8974

ferruccio opened this issue Mar 25, 2016 · 1 comment
Labels
bug

Comments

@ferruccio
Copy link

@ferruccio ferruccio commented Mar 25, 2016

Using build: 2016.03.25, I issued the command:

youtube-dl --id -ci --skip-download --no-check-certificate --write-sub --write-auto-sub --sub-lang en --sub-format ttml/vtt https://youtube.com/watch?v=z3iVAxxH56I

which yielded the following error:

[youtube] z3iVAxxH56I: Downloading webpage
[youtube] z3iVAxxH56I: Downloading video info webpage
[youtube] z3iVAxxH56I: Extracting video information
[youtube] z3iVAxxH56I: Looking for automatic captions
ERROR: 'ascii' codec can't encode characters in position 3-4: ordinal not in range(128)

I tried adding the --restrict-filenames option with no effect.

The title of this video is "Café Scientifique: Psychological Trauma and Resilience", which implies the é may be the source of the problem.

@yan12125
Copy link
Collaborator

@yan12125 yan12125 commented Mar 25, 2016

Confirmed with Python2.7:

$ youtube-dl -vs --write-auto-sub "https://youtube.com/watch?v=z3iVAxxH56I"
[debug] System config: []
[debug] User config: []
[debug] Command-line args: [u'-vs', u'--write-auto-sub', u'https://youtube.com/watch?v=z3iVAxxH56I']
[debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2016.03.18
[debug] Git HEAD: 53ec675
[debug] Python version 2.7.11 - Linux-4.5.0-1-ARCH-x86_64-with-glibc2.2.5
[debug] exe versions: avconv v12_dev0-2434-gf6ccee9, avprobe v12_dev0-2434-gf6ccee9, ffmpeg 3.0, ffprobe 3.0, rtmpdump 2.4
[debug] Proxy map: {}
[youtube] z3iVAxxH56I: Downloading webpage
[youtube] z3iVAxxH56I: Downloading video info webpage
[youtube] z3iVAxxH56I: Extracting video information
[youtube] z3iVAxxH56I: Looking for automatic captions
Traceback (most recent call last):
  File "<string>", line 23, in <module>
  File "/home/yen/Executables/Multimedia/youtube-dl/youtube_dl/__init__.py", line 419, in main
    _real_main(argv)
  File "/home/yen/Executables/Multimedia/youtube-dl/youtube_dl/__init__.py", line 409, in _real_main
    retcode = ydl.download(all_urls)
  File "/home/yen/Executables/Multimedia/youtube-dl/youtube_dl/YoutubeDL.py", line 1719, in download
    url, force_generic_extractor=self.params.get('force_generic_extractor', False))
  File "/home/yen/Executables/Multimedia/youtube-dl/youtube_dl/YoutubeDL.py", line 668, in extract_info
    ie_result = ie.extract(url)
  File "/home/yen/Executables/Multimedia/youtube-dl/youtube_dl/extractor/common.py", line 320, in extract
    return self._real_extract(url)
  File "/home/yen/Executables/Multimedia/youtube-dl/youtube_dl/extractor/youtube.py", line 1448, in _real_extract
    automatic_captions = self.extract_automatic_captions(video_id, video_webpage)
  File "/home/yen/Executables/Multimedia/youtube-dl/youtube_dl/extractor/common.py", line 1640, in extract_automatic_captions
    return self._get_automatic_captions(*args, **kwargs)
  File "/home/yen/Executables/Multimedia/youtube-dl/youtube_dl/extractor/youtube.py", line 1113, in _get_automatic_captions
    query=compat_urllib_parse.urlencode(caption_qs, True)))
  File "/usr/lib/python2.7/urllib.py", line 1372, in urlencode
    l.append(k + '=' + quote_plus(str(elt)))
UnicodeEncodeError: 'ascii' codec can't encode characters in position 3-4: ordinal not in range(128)

Please post the full verbose log with -v the next time.

@yan12125 yan12125 added the bug label Mar 25, 2016
@dstftw dstftw closed this in 15707c7 Mar 25, 2016
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.