question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Instragram stories - Failed to parse JSON

See original GitHub issue

Checklist

Region

UK

Description

Can’t download instragram stories on lastest version

Verbose log

yt-dlp https://www.instagram.com/stories/highlights/17941152226024129/ -vU
[debug] Command-line config: ['-i', '--format', '((571/272/402/337/315/313/401/336/308/400/271/335/303/299/399/137/248/334/302/298/398/247/136/333/244/135/397/332/243/134/396/331/242/133/395/330/160/394/278)[protocol!=http_dash_segments])+(bestaudio[acodec=opus]/bestaudio[protocol!=http_dash_segments])/best', 'https://www.instagram.com/stories/highlights/17941152226024129/', '-vU']
[debug] Encodings: locale UTF-8, fs utf-8, out utf-8, err utf-8, pref UTF-8
[debug] yt-dlp version 2022.03.08.1 [c0c2c57d3] (zip)
[debug] Python version 3.9.0 (CPython 64bit) - Linux-5.10.28-Unraid-x86_64-Intel-R-_Xeon-R-_CPU_E5-2650_v2_@_2.60GHz-with-glibc2.30
[debug] exe versions: ffmpeg N-54690-g682990a849-static
[debug] Optional libraries: sqlite
[debug] Proxy map: {}
Latest version: 2022.03.08.1, Current version: 2022.03.08.1
yt-dlp is up to date (2022.03.08.1)
[debug] [instagram:story] Extracting URL: https://www.instagram.com/stories/highlights/17941152226024129/
[instagram:story] 17941152226024129: Downloading JSON metadata
[instagram:story] 17941152226024129: Downloading JSON metadata
Traceback (most recent call last):
  File "/usr/local/bin/youtube-dl/yt_dlp/extractor/common.py", line 1008, in _parse_json
  File "/usr/lib64/python3.9/json/__init__.py", line 346, in loads
    return _default_decoder.decode(s)
  File "/usr/lib64/python3.9/json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/lib64/python3.9/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/local/bin/youtube-dl/yt_dlp/extractor/common.py", line 617, in extract
  File "/usr/local/bin/youtube-dl/yt_dlp/extractor/instagram.py", line 651, in _real_extract
  File "/usr/local/bin/youtube-dl/yt_dlp/extractor/common.py", line 997, in _download_json
  File "/usr/local/bin/youtube-dl/yt_dlp/extractor/common.py", line 983, in _download_json_handle
  File "/usr/local/bin/youtube-dl/yt_dlp/extractor/common.py", line 1012, in _parse_json
yt_dlp.utils.ExtractorError: 17941152226024129: Failed to parse JSON  (caused by JSONDecodeError('Expecting value: line 1 column 1 (char 0)')); please report this issue on  https://github.com/yt-dlp/yt-dlp , filling out the "Broken site" issue template properly. Confirm you are on the latest version using  yt-dlp -U

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/bin/youtube-dl/yt_dlp/YoutubeDL.py", line 1389, in wrapper
  File "/usr/local/bin/youtube-dl/yt_dlp/YoutubeDL.py", line 1459, in __extract_info
  File "/usr/local/bin/youtube-dl/yt_dlp/extractor/common.py", line 643, in extract
yt_dlp.utils.ExtractorError: [instagram:story] 17941152226024129: 17941152226024129: Failed to parse JSON  (caused by JSONDecodeError('Expecting value: line 1 column 1 (char 0)')); please report this issue on  https://github.com/yt-dlp/yt-dlp , filling out the "Broken site" issue template properly. Confirm you are on the latest version using  yt-dlp -U

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib64/python3.9/runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/lib64/python3.9/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/usr/local/bin/youtube-dl/__main__.py", line 19, in <module>
  File "/usr/local/bin/youtube-dl/yt_dlp/__init__.py", line 864, in main
  File "/usr/local/bin/youtube-dl/yt_dlp/__init__.py", line 854, in _real_main
  File "/usr/local/bin/youtube-dl/yt_dlp/YoutubeDL.py", line 3254, in download
  File "/usr/local/bin/youtube-dl/yt_dlp/YoutubeDL.py", line 3227, in wrapper
  File "/usr/local/bin/youtube-dl/yt_dlp/YoutubeDL.py", line 1380, in extract_info
  File "/usr/local/bin/youtube-dl/yt_dlp/YoutubeDL.py", line 1407, in wrapper
  File "/usr/local/bin/youtube-dl/yt_dlp/utils.py", line 1088, in format_traceback
TypeError: format_exception() missing 2 required positional arguments: 'value' and 'tb'

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
mehqcommented, Mar 10, 2022

I think reels API requires authentication. You should try with an account

0reactions
HobbyistDevcommented, Jul 4, 2022

I can confirm that I’m facing the same issue, even when using cookies.

Possible fix : #4074

Read more comments on GitHub >

github_iconTop Results From Across the Web

yt-dlp not downloading Instagram stories : r/youtubedl - Reddit
I tried to download a story and it gives the following error [instagram:story] 2810431268692324295: Downloading JSON metadata ...
Read more >
Unable to parse response, not valid JSON - Stack Overflow
instagram.bind.InstagramClientError: Unable to parse response, not valid JSON. Ok, so the response isn't JSON (despite the fact that I'd ...
Read more >
I'm Getting an Error Message - Instagram Help Center
I get an error when trying to add a comment on Instagram. If you're not able to add a comment, first try updating...
Read more >
How do i fix this Error: Unable to parse JSON response
How do i fix this Error: Unable to parse JSON response · Get $200 to try DigitalOcean - and do all the below...
Read more >
Parse Error: What It Is and How to Fix It - Lifewire
What's the Cause of an Android Parse Error? · The app is not compatible with your device. · Your phone does not have...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found