Skip to content

Unable to parse JSON from a particular Youtube video due to an unterminated string. #27524

Closed
@RhettVX

Description

Checklist

  • I'm reporting a broken site support issue
  • I've verified that I'm running youtube-dl version 2020.12.22
  • 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

[debug] System config: []
[debug] User config: ['--limit-rate', '2M', '--download-archive', 'ydl-saved-ids.txt', '--no-playlist', '--restrict-filenames', '-o', 'dlfolder/%(uploader)s/%(upload_date)s/%(title)s/%(id)s.%(ext)s', '-f', '(bestvideo[height>2160][vcodec^=av01]/bestvideo[height>2160][vcodec^=vp9]/bestvideo[height>1440][vcodec^=av01]/bestvideo[height>1440][vcodec^=vp9][fps>30]/bestvideo[height>1440][vcodec^=vp9]/bestvideo[height>1080][vcodec^=av01]/bestvideo[height>1080][vcodec^=vp9][fps>30]/bestvideo[height>1080][vcodec^=vp9]/bestvideo[height>720][vcodec^=av01]/bestvideo[height>720][vcodec^=vp9][fps>30]/bestvideo[height>720][vcodec^=vp9]/bestvideo[height>240][vcodec^=av01]/bestvideo[vcodec^=vp9][fps>30]/bestvideo[height>240][vcodec^=vp9]/best[height>240]/bestvideo[vcodec^=av01]/bestvideo[vcodec^=vp9]/bestvideo)+(bestaudio[asr=48000]/bestaudio)/bestaudio[ext=opus]/best', '--merge-output-format', 'mkv', '--write-annotations', '--write-description', '--write-info-json', '--write-all-thumbnails', '--all-subs', '--write-sub', '--embed-subs', '--convert-subs', 'srt', '--add-metadata', '--no-warnings']
[debug] Custom config: []
[debug] Command-line args: ['https://www.youtube.com/watch?v=gVfgbahppCY', '--verbose']
[debug] Encodings: locale cp1252, fs mbcs, out cp1252, pref cp1252
[debug] youtube-dl version 2020.12.22
[debug] Python version 3.4.4 (CPython) - Windows-10-10.0.19041
[debug] exe versions: ffmpeg 2020-09-24-git-14d6838638-essentials_build-www.gyan.dev
[debug] Proxy map: {}
[youtube] gVfgbahppCY: Downloading webpage
[youtube] Downloading just video gVfgbahppCY because of --no-playlist
ERROR: gVfgbahppCY: Failed to parse JSON  (caused by ValueError('Unterminated string starting at: line 1 column 17050 (char 17049)',)); please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type  youtube-dl -U  to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
Traceback (most recent call last):
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmprhhzjl7r\build\youtube_dl\extractor\common.py", line 904, in _parse_json
  File "C:\Python\Python34\lib\json\__init__.py", line 318, in loads
  File "C:\Python\Python34\lib\json\decoder.py", line 343, in decode
  File "C:\Python\Python34\lib\json\decoder.py", line 359, in raw_decode
ValueError: Unterminated string starting at: line 1 column 17050 (char 17049)
Traceback (most recent call last):
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmprhhzjl7r\build\youtube_dl\extractor\common.py", line 904, in _parse_json
  File "C:\Python\Python34\lib\json\__init__.py", line 318, in loads
  File "C:\Python\Python34\lib\json\decoder.py", line 343, in decode
  File "C:\Python\Python34\lib\json\decoder.py", line 359, in raw_decode
ValueError: Unterminated string starting at: line 1 column 17050 (char 17049)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmprhhzjl7r\build\youtube_dl\YoutubeDL.py", line 803, in wrapper
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmprhhzjl7r\build\youtube_dl\YoutubeDL.py", line 824, in __extract_info
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmprhhzjl7r\build\youtube_dl\extractor\common.py", line 532, in extract
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmprhhzjl7r\build\youtube_dl\extractor\youtube.py", line 2202, in _real_extract
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmprhhzjl7r\build\youtube_dl\extractor\youtube.py", line 301, in _extract_yt_initial_data
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmprhhzjl7r\build\youtube_dl\extractor\common.py", line 908, in _parse_json
youtube_dl.utils.ExtractorError: gVfgbahppCY: Failed to parse JSON  (caused by ValueError('Unterminated string starting at: line 1 column 17050 (char 17049)',)); please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type  youtube-dl -U  to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.

Description

Youtube-dl is unable to parse the json from this video (https://www.youtube.com/watch?v=gVfgbahppCY) due to an unterminated string according to the error log. I can't find anything out of the ordinary in the title or description. I am using the windows executable provided on the website.

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions