[GH-ISSUE #676] sp.search() is no longer working...returns JSON error #398

Closed
opened 2026-02-27 23:22:24 +03:00 by kerem · 6 comments
Owner

Originally created by @srprinz on GitHub (Apr 19, 2021).
Original GitHub issue: https://github.com/spotipy-dev/spotipy/issues/676

JSONDecodeError: Expecting value: line 1 column 1 (char 0)

Originally created by @srprinz on GitHub (Apr 19, 2021). Original GitHub issue: https://github.com/spotipy-dev/spotipy/issues/676 JSONDecodeError: Expecting value: line 1 column 1 (char 0)
kerem 2026-02-27 23:22:24 +03:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@Peter-Schorn commented on GitHub (Apr 20, 2021):

You need to post an example that reproduces this error.

<!-- gh-comment-id:822898872 --> @Peter-Schorn commented on GitHub (Apr 20, 2021): You need to post an example that reproduces this error.
Author
Owner

@srprinz commented on GitHub (Apr 20, 2021):

artist = sp.search(q="Lady Gaga", type="artist")
print(artist)

@Peter-Schorn

<!-- gh-comment-id:822899526 --> @srprinz commented on GitHub (Apr 20, 2021): artist = sp.search(q="Lady Gaga", type="artist") print(artist) @Peter-Schorn
Author
Owner

@Peter-Schorn commented on GitHub (Apr 20, 2021):

Can't reproduce. Please provide a fully self-contained script that I and copy and run.

JSONDecodeError: Expecting value: line 1 column 1 (char 0)

This indicates that when attempting to decode the string into a json object, a parsing error occurred at the very beginning of the string. This is likely because the string is completely empty.

<!-- gh-comment-id:822917458 --> @Peter-Schorn commented on GitHub (Apr 20, 2021): Can't reproduce. Please provide a fully self-contained script that I and copy and run. > JSONDecodeError: Expecting value: line 1 column 1 (char 0) This indicates that when attempting to decode the string into a json object, a parsing error occurred at the very beginning of the string. This is likely because the string is completely empty.
Author
Owner

@gustavokrieger commented on GitHub (Apr 21, 2021):

Maybe related to #570 (the error is raised in oauth2.py).

<!-- gh-comment-id:823699456 --> @gustavokrieger commented on GitHub (Apr 21, 2021): Maybe related to #570 (the error is raised in `oauth2.py`).
Author
Owner

@Peter-Schorn commented on GitHub (Apr 21, 2021):

Can you reproduce this error reliably in your code? JSONDecodeError has a doc parameter which contains the string that couldn't be decoded.

<!-- gh-comment-id:823702243 --> @Peter-Schorn commented on GitHub (Apr 21, 2021): Can you reproduce this error reliably in your code? [`JSONDecodeError`](https://docs.python.org/3/library/json.html#json.JSONDecodeError) has a `doc` parameter which contains the string that couldn't be decoded.
Author
Owner

@stephanebruckert commented on GitHub (Apr 21, 2021):

@srprinz we would need a minimal working example and a full stack trace to understand where the error exactly comes from. Also when creating this bug report you've skipped providing more information such as your environment:

**Describe the bug**
A clear and concise description of what the bug is.

**Your code**
Share a complete minimal working example.

**Expected behavior**
A clear and concise description of what you expected to happen.

**Output**
Paste and format errors (with complete stacktrace) or logs. Make sure to remove sensitive information.

**Environment:**
 - OS: [e.g. Windows, Mac]
 - Python version [e.g. 3.7.0]
 - spotipy version [e.g. 2.12.0]
 - your IDE (if using any) [e.g. PyCharm, Jupyter Notebook IDE, Google Colab]

**Additional context**
Add any other context about the problem here.

please update your initial post if possible

<!-- gh-comment-id:823824212 --> @stephanebruckert commented on GitHub (Apr 21, 2021): @srprinz we would need a [minimal working example](https://en.wikipedia.org/wiki/Minimal_working_example) and a full stack trace to understand where the error exactly comes from. Also when creating this bug report you've skipped providing more information such as your environment: ``` **Describe the bug** A clear and concise description of what the bug is. **Your code** Share a complete minimal working example. **Expected behavior** A clear and concise description of what you expected to happen. **Output** Paste and format errors (with complete stacktrace) or logs. Make sure to remove sensitive information. **Environment:** - OS: [e.g. Windows, Mac] - Python version [e.g. 3.7.0] - spotipy version [e.g. 2.12.0] - your IDE (if using any) [e.g. PyCharm, Jupyter Notebook IDE, Google Colab] **Additional context** Add any other context about the problem here. ``` please update your initial post if possible
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/spotipy#398
No description provided.