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

Failed to parse JSON - caused by JSONDecodeError #23369

Closed
Archifact opened this issue Dec 10, 2019 · 1 comment
Closed

Failed to parse JSON - caused by JSONDecodeError #23369

Archifact opened this issue Dec 10, 2019 · 1 comment

Comments

@Archifact
Copy link

@Archifact Archifact commented Dec 10, 2019

Hi,
I am having difficulties downloading videos from a site (pliease see the URL in the terminal output below). It has always been working perfectly before but now there are some issues.

youtube-dl --version
2019.11.28

youtube-dl --verbose https://www.raiplay.it/video/2019/10/la-grande-storia-doc---la-memoria-del-condor-69c20436-efeb-4a98-92f5-570afcdf09e6.html
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['--verbose', 'https://www.raiplay.it/video/2019/10/la-grande-storia-doc---la-memoria-del-condor-69c20436-efeb-4a98-92f5-570afcdf09e6.html']
[debug] Encodings: locale UTF-8, fs utf-8, out utf-8, pref UTF-8
[debug] youtube-dl version 2019.11.28
[debug] Python version 3.8.0 (CPython) - Linux-5.4.2-1-MANJARO-x86_64-with-glibc2.2.5
[debug] exe versions: ffmpeg 4.2.1, ffprobe 4.2.1, rtmpdump 2.4
[debug] Proxy map: {}
[RaiPlay] 69c20436-efeb-4a98-92f5-570afcdf09e6: Downloading video JSON
ERROR: 69c20436-efeb-4a98-92f5-570afcdf09e6: Failed to parse JSON (caused by JSONDecodeError('Expecting value: line 1 column 1 (char 0)')); 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.8/site-packages/youtube_dl/extractor/common.py", line 899, in _parse_json
return json.loads(json_string)
File "/usr/lib/python3.8/json/init.py", line 357, in loads
return _default_decoder.decode(s)
File "/usr/lib/python3.8/json/decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib/python3.8/json/decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
Traceback (most recent call last):
File "/usr/lib/python3.8/site-packages/youtube_dl/extractor/common.py", line 899, in _parse_json
return json.loads(json_string)
File "/usr/lib/python3.8/json/init.py", line 357, in loads
return _default_decoder.decode(s)
File "/usr/lib/python3.8/json/decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib/python3.8/json/decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/lib/python3.8/site-packages/youtube_dl/YoutubeDL.py", line 796, in extract_info
ie_result = ie.extract(url)
File "/usr/lib/python3.8/site-packages/youtube_dl/extractor/common.py", line 530, in extract
ie_result = self._real_extract(url)
File "/usr/lib/python3.8/site-packages/youtube_dl/extractor/rai.py", line 173, in _real_extract
media = self._download_json(
File "/usr/lib/python3.8/site-packages/youtube_dl/extractor/common.py", line 888, in _download_json
res = self._download_json_handle(
File "/usr/lib/python3.8/site-packages/youtube_dl/extractor/common.py", line 874, in _download_json_handle
return self._parse_json(
File "/usr/lib/python3.8/site-packages/youtube_dl/extractor/common.py", line 903, in _parse_json
raise ExtractorError(errmsg, cause=ve)
youtube_dl.utils.ExtractorError: 69c20436-efeb-4a98-92f5-570afcdf09e6: Failed to parse JSON (caused by JSONDecodeError('Expecting value: line 1 column 1 (char 0)')); 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.

I'll be truly grateful if there is a fix for this or if you could point me to a direction I could solve this issue.

Thank you!

@donatom805
Copy link

@donatom805 donatom805 commented Dec 13, 2019

I have been getting the same error for the past 1 - 2 months when using yt-dl for raiplay.it streams/videos. I am using the latest youtube-dl (youtube-dl-2019.11.28).

Here is my debug info:

$ youtube-dl https://www.raiplay.it/video/2018/04/FILM-Nemiche-per-la-pelle-3bfab96d-9153-4a14-87a7-0064adcab88d.html
[RaiPlay] 3bfab96d-9153-4a14-87a7-0064adcab88d: Downloading video JSON
ERROR: 3bfab96d-9153-4a14-87a7-0064adcab88d: Failed to parse JSON (caused by ValueError('No JSON object could be decoded',)); 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.
[donatom@unknown9cd21e30a7cb Desktop]$ youtube-dl -v https://www.raiplay.it/video/2018/04/FILM-Nemiche-per-la-pelle-3bfab96d-9153-4a14-87a7-0064adcab88d.html
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: [u'-v', u'https://www.raiplay.it/video/2018/04/FILM-Nemiche-per-la-pelle-3bfab96d-9153-4a14-87a7-0064adcab88d.html']
[debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2019.11.28
[debug] Python version 2.7.17 (CPython) - Linux-5.3.11-200.fc30.x86_64-x86_64-with-fedora-30-Thirty
[debug] exe versions: ffmpeg 4.1.4, ffprobe 4.1.4
[debug] Proxy map: {}
[RaiPlay] 3bfab96d-9153-4a14-87a7-0064adcab88d: Downloading video JSON
ERROR: 3bfab96d-9153-4a14-87a7-0064adcab88d: Failed to parse JSON (caused by ValueError('No JSON object could be decoded',)); 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 "/home/donatom/.local/lib/python2.7/site-packages/youtube_dl/extractor/common.py", line 899, in _parse_json
return json.loads(json_string)
File "/usr/lib64/python2.7/json/init.py", line 339, in loads
return _default_decoder.decode(s)
File "/usr/lib64/python2.7/json/decoder.py", line 364, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib64/python2.7/json/decoder.py", line 382, in raw_decode
raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded
Traceback (most recent call last):
File "/home/donatom/.local/lib/python2.7/site-packages/youtube_dl/YoutubeDL.py", line 796, in extract_info
ie_result = ie.extract(url)
File "/home/donatom/.local/lib/python2.7/site-packages/youtube_dl/extractor/common.py", line 530, in extract
ie_result = self._real_extract(url)
File "/home/donatom/.local/lib/python2.7/site-packages/youtube_dl/extractor/rai.py", line 174, in _real_extract
'%s?json' % url, video_id, 'Downloading video JSON')
File "/home/donatom/.local/lib/python2.7/site-packages/youtube_dl/extractor/common.py", line 892, in _download_json
expected_status=expected_status)
File "/home/donatom/.local/lib/python2.7/site-packages/youtube_dl/extractor/common.py", line 876, in _download_json_handle
fatal=fatal), urlh
File "/home/donatom/.local/lib/python2.7/site-packages/youtube_dl/extractor/common.py", line 903, in _parse_json
raise ExtractorError(errmsg, cause=ve)
ExtractorError: 3bfab96d-9153-4a14-87a7-0064adcab88d: Failed to parse JSON (caused by ValueError('No JSON object could be decoded',)); 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.

Hopefully someone can come up with a fix.

@remitamine remitamine closed this Dec 13, 2019
@ytdl-org ytdl-org locked and limited conversation to collaborators Jan 3, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
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.