[RTP] Failed to parse JSON #24931

Open
opened 2026-02-21 13:34:33 -05:00 by deekerman · 1 comment
Owner

Originally created by @zorbathegreek on GitHub (Jan 22, 2022).

Hello,

I was trying to download a video with it's captions (to learn Portuguese) but that failed. Please see below output (with --verbose).
Portuguese is spoken very fast, and even with the provided captions, it is still not easy to understand the whole video content, so ... I thought I'd download and play the video in a player that provides reduced speed.

Any chance to fix this? Thanks a lot!

$ youtube-dl --all-subs --verbose https://www.rtp.pt/play/p8322/nada-sera-como-dante
[debug] System config: ['--prefer-free-formats']
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['--all-subs', '--verbose', 'https://www.rtp.pt/play/p8322/nada-sera-como-dante']
[debug] Encodings: locale UTF-8, fs utf-8, out utf-8, pref UTF-8
[debug] youtube-dl version 2021.06.06
[debug] Python version 3.10.1 (CPython) - Linux-5.15.14-200.fc35.x86_64-x86_64-with-glibc2.34
[debug] exe versions: ffmpeg 4.4.1, ffprobe 4.4.1
[debug] Proxy map: {}
[RTP] nada-sera-como-dante: Downloading webpage
ERROR: nada-sera-como-dante: Failed to parse JSON (caused by JSONDecodeError("Expecting ',' delimiter: line 2 column 36 (char 37)")); please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; see https://yt-dl.org/update on how to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
Traceback (most recent call last):
File "/usr/lib/python3.10/site-packages/youtube_dl/extractor/common.py", line 906, in _parse_json
return json.loads(json_string)
File "/usr/lib64/python3.10/json/init.py", line 346, in loads
return _default_decoder.decode(s)
File "/usr/lib64/python3.10/json/decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib64/python3.10/json/decoder.py", line 353, in raw_decode
obj, end = self.scan_once(s, idx)
json.decoder.JSONDecodeError: Expecting ',' delimiter: line 2 column 36 (char 37)
Traceback (most recent call last):
File "/usr/lib/python3.10/site-packages/youtube_dl/extractor/common.py", line 906, in _parse_json
return json.loads(json_string)
File "/usr/lib64/python3.10/json/init.py", line 346, in loads
return _default_decoder.decode(s)
File "/usr/lib64/python3.10/json/decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib64/python3.10/json/decoder.py", line 353, in raw_decode
obj, end = self.scan_once(s, idx)
json.decoder.JSONDecodeError: Expecting ',' delimiter: line 2 column 36 (char 37)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/lib/python3.10/site-packages/youtube_dl/YoutubeDL.py", line 814, in wrapper
return func(self, *args, **kwargs)
File "/usr/lib/python3.10/site-packages/youtube_dl/YoutubeDL.py", line 835, in __extract_info
ie_result = ie.extract(url)
File "/usr/lib/python3.10/site-packages/youtube_dl/extractor/common.py", line 534, in extract
ie_result = self._real_extract(url)
File "/usr/lib/python3.10/site-packages/youtube_dl/extractor/rtp.py", line 35, in _real_extract
config = self._parse_json(self._search_regex(
File "/usr/lib/python3.10/site-packages/youtube_dl/extractor/common.py", line 910, in _parse_json
raise ExtractorError(errmsg, cause=ve)
youtube_dl.utils.ExtractorError: nada-sera-como-dante: Failed to parse JSON (caused by JSONDecodeError("Expecting ',' delimiter: line 2 column 36 (char 37)")); please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; see https://yt-dl.org/update on how to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.

Originally created by @zorbathegreek on GitHub (Jan 22, 2022). Hello, I was trying to download a video with it's captions (to learn Portuguese) but that failed. Please see below output (with --verbose). Portuguese is spoken very fast, and even with the provided captions, it is still not easy to understand the whole video content, so ... I thought I'd download and play the video in a player that provides reduced speed. Any chance to fix this? Thanks a lot! $ youtube-dl --all-subs --verbose https://www.rtp.pt/play/p8322/nada-sera-como-dante [debug] System config: ['--prefer-free-formats'] [debug] User config: [] [debug] Custom config: [] [debug] Command-line args: ['--all-subs', '--verbose', 'https://www.rtp.pt/play/p8322/nada-sera-como-dante'] [debug] Encodings: locale UTF-8, fs utf-8, out utf-8, pref UTF-8 [debug] youtube-dl version 2021.06.06 [debug] Python version 3.10.1 (CPython) - Linux-5.15.14-200.fc35.x86_64-x86_64-with-glibc2.34 [debug] exe versions: ffmpeg 4.4.1, ffprobe 4.4.1 [debug] Proxy map: {} [RTP] nada-sera-como-dante: Downloading webpage ERROR: nada-sera-como-dante: Failed to parse JSON (caused by JSONDecodeError("Expecting ',' delimiter: line 2 column 36 (char 37)")); please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; see https://yt-dl.org/update on how to update. Be sure to call youtube-dl with the --verbose flag and include its complete output. Traceback (most recent call last): File "/usr/lib/python3.10/site-packages/youtube_dl/extractor/common.py", line 906, in _parse_json return json.loads(json_string) File "/usr/lib64/python3.10/json/__init__.py", line 346, in loads return _default_decoder.decode(s) File "/usr/lib64/python3.10/json/decoder.py", line 337, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "/usr/lib64/python3.10/json/decoder.py", line 353, in raw_decode obj, end = self.scan_once(s, idx) json.decoder.JSONDecodeError: Expecting ',' delimiter: line 2 column 36 (char 37) Traceback (most recent call last): File "/usr/lib/python3.10/site-packages/youtube_dl/extractor/common.py", line 906, in _parse_json return json.loads(json_string) File "/usr/lib64/python3.10/json/__init__.py", line 346, in loads return _default_decoder.decode(s) File "/usr/lib64/python3.10/json/decoder.py", line 337, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "/usr/lib64/python3.10/json/decoder.py", line 353, in raw_decode obj, end = self.scan_once(s, idx) json.decoder.JSONDecodeError: Expecting ',' delimiter: line 2 column 36 (char 37) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/lib/python3.10/site-packages/youtube_dl/YoutubeDL.py", line 814, in wrapper return func(self, *args, **kwargs) File "/usr/lib/python3.10/site-packages/youtube_dl/YoutubeDL.py", line 835, in __extract_info ie_result = ie.extract(url) File "/usr/lib/python3.10/site-packages/youtube_dl/extractor/common.py", line 534, in extract ie_result = self._real_extract(url) File "/usr/lib/python3.10/site-packages/youtube_dl/extractor/rtp.py", line 35, in _real_extract config = self._parse_json(self._search_regex( File "/usr/lib/python3.10/site-packages/youtube_dl/extractor/common.py", line 910, in _parse_json raise ExtractorError(errmsg, cause=ve) youtube_dl.utils.ExtractorError: nada-sera-como-dante: Failed to parse JSON (caused by JSONDecodeError("Expecting ',' delimiter: line 2 column 36 (char 37)")); please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; see https://yt-dl.org/update on how to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
Author
Owner

@dirkf commented on GitHub (Jan 22, 2022):

Duplicate of #29458, pending PR #29824.

@dirkf commented on GitHub (Jan 22, 2022): Duplicate of #29458, pending PR #29824.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/youtube-dl-ytdl-org#24931
No description provided.