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

UnicodeDecodeError: 'utf-8' codec can't decode bytes in position 4-5: invalid continuation byte #24534

Closed
YuGiOhJCJ opened this issue Mar 29, 2020 · 0 comments
Labels

Comments

@YuGiOhJCJ
Copy link

@YuGiOhJCJ YuGiOhJCJ commented Mar 29, 2020

Checklist

  • I'm reporting a broken site support issue
  • I've verified that I'm running youtube-dl version 2020.03.24
  • I've checked that all provided URLs are alive and playable in a browser
  • I've checked that all URLs and arguments with special characters are properly quoted or escaped
  • I've searched the bugtracker for similar bug reports including closed ones
  • I've read bugs section in FAQ

Verbose log

$ youtube-dl -v --all-subs https://animedigitalnetwork.fr/video/naruto/4189-episode-1-et-voici-naruto-uzumaki
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['-v', '--all-subs', 'https://animedigitalnetwork.fr/video/naruto/4189-episode-1-et-voici-naruto-uzumaki']
[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2020.03.24
[debug] Python version 3.6.2 (CPython) - Linux-5.2.8-desktop-x86_64-Intel-R-_Celeron-R-_CPU_G3920_@_2.90GHz-with-slackware-14.2
[debug] exe versions: ffmpeg 4.1, ffprobe 4.1
[debug] Proxy map: {}
[ADN] 4189: Downloading webpage
[ADN] 4189: Downloading player config JSON metadata
[ADN] 4189: Downloading links JSON metadata
[ADN] 4189: Downloading vostf mobile JSON metadata
[ADN] 4189: Downloading m3u8 information
[ADN] 4189: Downloading vostf sd JSON metadata
[ADN] 4189: Downloading m3u8 information
[ADN] 4189: Downloading subtitles location
[ADN] 4189: Downloading subtitles data
Traceback (most recent call last):
  File "/usr/bin/youtube-dl", line 11, in <module>
    load_entry_point('youtube-dl==2020.3.24', 'console_scripts', 'youtube-dl')()
  File "/usr/lib64/python3.6/site-packages/youtube_dl/__init__.py", line 474, in main
    _real_main(argv)
  File "/usr/lib64/python3.6/site-packages/youtube_dl/__init__.py", line 464, in _real_main
    retcode = ydl.download(all_urls)
  File "/usr/lib64/python3.6/site-packages/youtube_dl/YoutubeDL.py", line 2019, in download
    url, force_generic_extractor=self.params.get('force_generic_extractor', False))
  File "/usr/lib64/python3.6/site-packages/youtube_dl/YoutubeDL.py", line 797, in extract_info
    ie_result = ie.extract(url)
  File "/usr/lib64/python3.6/site-packages/youtube_dl/extractor/common.py", line 530, in extract
    ie_result = self._real_extract(url)
  File "/usr/lib64/python3.6/site-packages/youtube_dl/extractor/adn.py", line 204, in _real_extract
    'subtitles': self.extract_subtitles(sub_path, video_id),
  File "/usr/lib64/python3.6/site-packages/youtube_dl/extractor/common.py", line 2892, in extract_subtitles
    return self._get_subtitles(*args, **kwargs)
  File "/usr/lib64/python3.6/site-packages/youtube_dl/extractor/adn.py", line 80, in _get_subtitles
    dec_subtitles[:-compat_ord(dec_subtitles[-1])].decode(),
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe6 in position 0: invalid continuation byte

Description

When I download a video on ADN with all the available subtitles of the video, there is an error.
It seems to be a problem with an unicode character that can't be decoded.
I saw several open bugs about UnicodeDecodeError but none at position 0 so I report.
If you think it is a duplicated bug, feel free to close this one.

Is there a workaround or a fix for that please?

Thank you.
Best regards.

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.