[GH-ISSUE #873] Errors when running example code #535

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

Originally created by @duckyfuz on GitHub (Oct 23, 2022).
Original GitHub issue: https://github.com/spotipy-dev/spotipy/issues/873

When running the example code here (https://github.com/plamere/spotipy/blob/master/examples/app.py) via the terminal, I get this error:
Traceback (most recent call last):
File "/home/kenne/Project/app(exp).py", line 109, in
os.environ.get("SPOTIPY_REDIRECT_URI", 8080).split(":")[-1])))
AttributeError: 'int' object has no attribute 'split'

When running the same code via flask run, I get this error:
[2022-10-23 09:42:33,459] ERROR in app: Exception on / [GET]
Traceback (most recent call last):
File "/home/kenne/.local/lib/python3.8/site-packages/flask/app.py", line 2525, in wsgi_app
response = self.full_dispatch_request()
File "/home/kenne/.local/lib/python3.8/site-packages/flask/app.py", line 1822, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/home/kenne/.local/lib/python3.8/site-packages/flask/app.py", line 1820, in full_dispatch_request
rv = self.dispatch_request()
File "/home/kenne/.local/lib/python3.8/site-packages/flask/app.py", line 1796, in dispatch_request
return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
File "/home/kenne/Project/app.py", line 37, in index
cache_handler = spotipy.cache_handler.FlaskSessionCacheHandler(session)
AttributeError: module 'spotipy.cache_handler' has no attribute 'FlaskSessionCacheHandler'

Originally created by @duckyfuz on GitHub (Oct 23, 2022). Original GitHub issue: https://github.com/spotipy-dev/spotipy/issues/873 When running the example code here (https://github.com/plamere/spotipy/blob/master/examples/app.py) via the terminal, I get this error: Traceback (most recent call last): File "/home/kenne/Project/app(exp).py", line 109, in <module> os.environ.get("SPOTIPY_REDIRECT_URI", 8080).split(":")[-1]))) AttributeError: 'int' object has no attribute 'split' When running the same code via flask run, I get this error: [2022-10-23 09:42:33,459] ERROR in app: Exception on / [GET] Traceback (most recent call last): File "/home/kenne/.local/lib/python3.8/site-packages/flask/app.py", line 2525, in wsgi_app response = self.full_dispatch_request() File "/home/kenne/.local/lib/python3.8/site-packages/flask/app.py", line 1822, in full_dispatch_request rv = self.handle_user_exception(e) File "/home/kenne/.local/lib/python3.8/site-packages/flask/app.py", line 1820, in full_dispatch_request rv = self.dispatch_request() File "/home/kenne/.local/lib/python3.8/site-packages/flask/app.py", line 1796, in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) File "/home/kenne/Project/app.py", line 37, in index cache_handler = spotipy.cache_handler.FlaskSessionCacheHandler(session) AttributeError: module 'spotipy.cache_handler' has no attribute 'FlaskSessionCacheHandler'
kerem 2026-02-27 23:23:12 +03:00
  • closed this issue
  • added the
    question
    label
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#535
No description provided.