Skip to content

Getting error 'Couldn't read cache at: .cache' with example code #579

Description

@kbots-tech

Describe the bug
Using the example auth code I get the error 'Couldn't read cache at: .cache' I've tried looking around but can't find a reference to this specific error anywhere. I'm using the Online IDE repl.it but it seems users have used it with no trouble before looking at other projects

Your code
import spotipy
from spotipy.oauth2 import SpotifyOAuth

scope = "user-library-read"

sp = spotipy.Spotify(auth_manager=SpotifyOAuth(scope=scope))

results = sp.current_user_saved_tracks()
for idx, item in enumerate(results['items']):
track = item['track']
print(idx, track['artists'][0]['name'], " – ", track['name'])

Environment:

  • OS: [Linux Container (I believe)]
  • Python version [e.g. 3.8.2]
  • spotipy version [e.g. 2.16.0]
  • your IDE (if using any) [Repl.it]

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions