JSONDecodeError when trying to download
Author: neo42O69Created Sep 12, 2026Updated Sep 12, 2026
LabelsBug
System OS
Linux
Python Version
3.12 (CPython)
Install Source
pip / PyPi
Install version / commit hash
v4.5.2
External JavaScript runtime (Deno)
Deno via spotdl --download-deno
Expected Behavior vs Actual Behavior
Whenever I try to download a song, the terminal returns the traceback. When I retry, spotdl tries to download but returns "JSONDecodeError: Expecting value: line 1 column 1 (char 0)"
The expected behavior is for the songs to download
Steps to reproduce - Ensure to include actual links!
- Try to download anything Terminal returns traceback
- Retry Terminal looks like it's downloading but then returns the aforementioned error for every song
Traceback
╭───────────────────── Traceback (most recent call last) ──────────────────────╮
│ /home/neo/.local/bin/spotdl:6 in <module> │
│ │
│ 5 │ sys.argv[0] = sys.argv[0].removesuffix('.exe') │
│ ❱ 6 │ sys.exit(console_entry_point()) │
│ 7 │
│ │
│ /home/neo/.local/share/pipx/venvs/spotdl/lib/python3.12/site-packages/spotdl │
│ /console/entry_point.py:53 in console_entry_point │
│ │
│ 52 │ else: │
│ ❱ 53 │ │ entry_point() │
│ 54 │
│ │
│ /home/neo/.local/share/pipx/venvs/spotdl/lib/python3.12/site-packages/spotdl │
│ /console/entry_point.py:100 in entry_point │
│ │
│ 99 │ if "youtube-music" in downloader_settings["audio_providers"]: │
│ ❱ 100 │ │ if not check_ytmusic_connection(): │
│ 101 │ │ │ logger.warning( │
│ │
│ /home/neo/.local/share/pipx/venvs/spotdl/lib/python3.12/site-packages/spotdl │
│ /utils/downloader.py:21 in check_ytmusic_connection │
│ │
│ 20 │ ytm = YouTubeMusic() │
│ ❱ 21 │ test_results = ytm.get_results("a", log_search_failures=False) │
│ 22 │ if len(test_results) == 0: │
│ │
│ /home/neo/.local/share/pipx/venvs/spotdl/lib/python3.12/site-packages/spotdl │
│ /providers/audio/ytmusic.py:73 in get_results │
│ │
│ 72 │ │ for attempt in range(self.SEARCH_ATTEMPTS): │
│ ❱ 73 │ │ │ search_results = self.client.search(search_term, **kwargs) │
│ 74 │
│ │
│ /home/neo/.local/share/pipx/venvs/spotdl/lib/python3.12/site-packages/ytmusi │
│ capi/mixins/search.py:207 in search │
│ │
│ 206 │ │ │
│ ❱ 207 │ │ response = self._send_request(endpoint, body) │
│ 208 │
│ │
│ /home/neo/.local/share/pipx/venvs/spotdl/lib/python3.12/site-packages/ytmusi │
│ capi/ytmusic.py:246 in _send_request │
│ │
│ 245 │ │ ) │
│ ❱ 246 │ │ response_text: JsonDict = json.loads(response.text) │
│ 247 │ │ if response.status_code >= 400: │
│ │
│ /usr/lib/python3.12/json/__init__.py:346 in loads │
│ │
│ 345 │ │ │ parse_constant is None and object_pairs_hook is None and n │
│ ❱ 346 │ │ return _default_decoder.decode(s) │
│ 347 │ if cls is None: │
│ │
│ /usr/lib/python3.12/json/decoder.py:337 in decode │
│ │
│ 336 │ │ """ │
│ ❱ 337 │ │ obj, end = self.raw_decode(s, idx=_w(s, 0).end()) │
│ 338 │ │ end = _w(s, end).end() │
│ │
│ /usr/lib/python3.12/json/decoder.py:355 in raw_decode │
│ │
│ 354 │ │ except StopIteration as err: │
│ ❱ 355 │ │ │ raise JSONDecodeError("Expecting value", s, err.value) fro │
│ 356 │ │ return obj, end │
╰──────────────────────────────────────────────────────────────────────────────╯
JSONDecodeError: Expecting value: line 1 column 1 (char 0)Other details
I found similar issues and their solutions didn't help me. Also, yt-dlp works fine
Worked a couple of minutes ago before I restarted
I tried reinstalling ffmpeg, deno and spotdl and restarting
Source: spotDL/spotify-downloader