[GH-ISSUE #713] cannot import spotipy.cache_handler.MemoryCacheHandler #424

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

Originally created by @tridelt on GitHub (Jul 31, 2021).
Original GitHub issue: https://github.com/spotipy-dev/spotipy/issues/713

Describe the bug
I am unable to import the MemoryCacheHandler

Your code
from spotipy.cache_handler import MemoryCacheHandler

Output

ImportError                               Traceback (most recent call last)
<ipython-input-1-f656db8af614> in <module>
----> 1 from spotipy.cache_handler import MemoryCacheHandler

ImportError: cannot import name 'MemoryCacheHandler' from 'spotipy.cache_handler' (/Users/peter/anaconda3/lib/python3.8/site-packages/spotipy/cache_handler.py)

Environment:

  • OS: Mac
  • Python version python3.8
  • spotipy version 2.18.0
  • IDE: PyCharm and also Google Colab

Would love to get an answer : )
Yours
Tridelt

Originally created by @tridelt on GitHub (Jul 31, 2021). Original GitHub issue: https://github.com/spotipy-dev/spotipy/issues/713 **Describe the bug** I am unable to import the MemoryCacheHandler **Your code** ```from spotipy.cache_handler import MemoryCacheHandler``` **Output** ```--------------------------------------------------------------------------- ImportError Traceback (most recent call last) <ipython-input-1-f656db8af614> in <module> ----> 1 from spotipy.cache_handler import MemoryCacheHandler ImportError: cannot import name 'MemoryCacheHandler' from 'spotipy.cache_handler' (/Users/peter/anaconda3/lib/python3.8/site-packages/spotipy/cache_handler.py) ``` **Environment:** - OS: Mac - Python version python3.8 - spotipy version 2.18.0 - IDE: PyCharm and also Google Colab Would love to get an answer : ) Yours Tridelt
kerem 2026-02-27 23:22:33 +03:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@Peter-Schorn commented on GitHub (Jul 31, 2021):

That's because MemoryCacheHandler doesn't exist in version 2.18.0. You should've looked at the file path in the error message.

<!-- gh-comment-id:890382325 --> @Peter-Schorn commented on GitHub (Jul 31, 2021): That's because `MemoryCacheHandler` doesn't exist in version 2.18.0. You should've looked at the file path in the error message.
Author
Owner

@tridelt commented on GitHub (Jul 31, 2021):

@Peter-Schorn thank you!

<!-- gh-comment-id:890383087 --> @tridelt commented on GitHub (Jul 31, 2021): @Peter-Schorn thank you!
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#424
No description provided.