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.

Cannot access `.cache` file

See original GitHub issue

I have setup env vars but still getting this error

❯ python3 spotifypod.py
Couldn't read cache at: .cache
Couldn't read cache at: .cache
Enter the URL you were redirected to: http://google.com
Enter the URL you were redirected to: no ints
Couldn't read cache at: .cache

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:16 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
dupontgucommented, Feb 2, 2021

Thank you @utkut I appreciate all the help.

0reactions
doctorleachcommented, Mar 8, 2021

I also was having two nights of trouble getting the .cache file. In my case the solution turned out to be simple–install a browser on the Pi Zero. I don’t believe this step was mentioned in the guides. From past experience I thought Midori might be a good lightweight browser to install but it took some time because of the many dependencies. Also, it really taxes the Pi Zero, so to speed thing up a lot, I popped the SD card from the Zero into a Pi 4 and Midori ran at an acceptable speed. It was called automatically when I tried to run the spotifypod.py script and I had to log into spotify to approve the authorization. This only needs to be done once (unless you somehow erase the .cache file). I don’t think the browser gets called again, which is fortunate given how many resources it takes up.

If you get an “address already in use” error, just reboot the Pi. Also, as mentioned above the environment variables need to be set, particularly paying attention that the SPOTIPY_REDIRECT_URI matches the redirect URI you entered into your project in developer.spotify.com exactly.

Finally, at least one of the following commands needs to be uncommented–i.e., active–in spotifypod.py (the second calls the first, so no need for both):

spotify_manager.refresh_devices() spotify_manager.refresh_data()

Read more comments on GitHub >

github_iconTop Results From Across the Web

CACHE File Problems: Why Your PC Won't Open CACHE Files
Error Message: The CACHE File is Corrupt​​ The only solution to a corrupt file, is to download a new copy, or to ask...
Read more >
CACHE File (What It Is & How to Open One) - Lifewire
A CACHE file is usually a temporary, generic type of file. You can open a cache file as a text document, but it...
Read more >
Applications try to access web cache content that belongs to ...
Open Windows File Explorer, and locate the appropriate profile folder location. Select View > Options > View. In the Advanced settings list, ...
Read more >
How Do I Fix My Caching Problems Or Clear Web Browser's ...
Open your browser and and got to Tools > Safety menu. · Click Delete Browsing History. · Select Temporary Internet Files and Cookies...
Read more >
Cache cannot access /home/<system name>/ directory in linux
I have a repository that I want to have in my /home/centos7/ directory, but it appears that Cache cannot access files there.
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