[GH-ISSUE #836] flask session cache handler in 2.20.0 #515

Closed
opened 2026-02-27 23:23:04 +03:00 by kerem · 4 comments
Owner

Originally created by @gabylorenzi on GitHub (Jul 7, 2022).
Original GitHub issue: https://github.com/spotipy-dev/spotipy/issues/836

code i am running
python3 auth-test.py (a renamed version of app.py from the 2.20.0 version of spotipy)

environment:
python3
pip3
spotipy=2.20.0

error message:
`python3 auth-test.py

  • Serving Flask app 'auth-test' (lazy loading)
  • Environment: production
    WARNING: This is a development server. Do not use it in a production deployment.
    Use a production WSGI server instead.
  • Debug mode: off
  • Running on http://127.0.0.1:8080 (Press CTRL+C to quit)
    [2022-07-06 20:08:26,738] ERROR in app: Exception on / [GET]
    Traceback (most recent call last):
    File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/flask/app.py", line 2077, in wsgi_app
    response = self.full_dispatch_request()
    File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/flask/app.py", line 1525, in full_dispatch_request
    rv = self.handle_user_exception(e)
    File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/flask/app.py", line 1523, in full_dispatch_request
    rv = self.dispatch_request()
    File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/flask/app.py", line 1509, in dispatch_request
    return self.ensure_sync(self.view_functions[rule.endpoint])(**req.view_args)
    File "auth-test.py", line 41, in index
    cache_handler = spotipy.cache_handler.FlaskSessionCacheHandler(session)
    AttributeError: module 'spotipy.cache_handler' has no attribute 'FlaskSessionCacheHandler'`

I can see that there is a newly added flask session cache handler in the version 2.20.0, but despite having the latest version of spottily installed, i am getting an error. would love any help! thanks in advance!

Originally created by @gabylorenzi on GitHub (Jul 7, 2022). Original GitHub issue: https://github.com/spotipy-dev/spotipy/issues/836 <!--- Please make sure you've: - read the FAQ https://github.com/plamere/spotipy/blob/master/FAQ.md - read the documentation https://spotipy.readthedocs.io/en/latest/ - searched older issues If your question is about code, please share the code you are using ---> **code i am running** python3 auth-test.py (a renamed version of app.py from the 2.20.0 version of spotipy) **environment:** python3 pip3 spotipy=2.20.0 **error message:** `python3 auth-test.py * Serving Flask app 'auth-test' (lazy loading) * Environment: production WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead. * Debug mode: off * Running on http://127.0.0.1:8080 (Press CTRL+C to quit) [2022-07-06 20:08:26,738] ERROR in app: Exception on / [GET] Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/flask/app.py", line 2077, in wsgi_app response = self.full_dispatch_request() File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/flask/app.py", line 1525, in full_dispatch_request rv = self.handle_user_exception(e) File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/flask/app.py", line 1523, in full_dispatch_request rv = self.dispatch_request() File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/flask/app.py", line 1509, in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**req.view_args) File "auth-test.py", line 41, in index cache_handler = spotipy.cache_handler.FlaskSessionCacheHandler(session) AttributeError: module 'spotipy.cache_handler' has no attribute 'FlaskSessionCacheHandler'` I can see that there is a newly added flask session cache handler in the version 2.20.0, but despite having the latest version of spottily installed, i am getting an error. would love any help! thanks in advance!
kerem 2026-02-27 23:23:04 +03:00
  • closed this issue
  • added the
    question
    label
Author
Owner

@stephanebruckert commented on GitHub (Aug 22, 2022):

I need to release 2.21.0 for it to be available. For now you can use master or a specific commit.

<!-- gh-comment-id:1222680693 --> @stephanebruckert commented on GitHub (Aug 22, 2022): I need to release 2.21.0 for it to be available. For now you can use master or a specific commit.
Author
Owner

@ckahle33 commented on GitHub (Oct 26, 2022):

would love to use this with flask as well.

<!-- gh-comment-id:1292458625 --> @ckahle33 commented on GitHub (Oct 26, 2022): would love to use this with flask as well.
Author
Owner

@stephanebruckert commented on GitHub (Oct 29, 2022):

Done, please upgrade :-) https://pypi.org/project/spotipy/2.21.0/

<!-- gh-comment-id:1295814482 --> @stephanebruckert commented on GitHub (Oct 29, 2022): Done, please upgrade :-) https://pypi.org/project/spotipy/2.21.0/
Author
Owner

@ckahle33 commented on GitHub (Nov 1, 2022):

Thank you so much Stephane and team for your work on spotipy!

<!-- gh-comment-id:1297973759 --> @ckahle33 commented on GitHub (Nov 1, 2022): Thank you so much Stephane and team for your work on spotipy!
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#515
No description provided.