mirror of
https://github.com/spotipy-dev/spotipy.git
synced 2026-04-26 16:15:51 +03:00
[GH-ISSUE #873] Errors when running example code #535
Labels
No labels
api-bug
bug
dependencies
documentation
duplicate
enhancement
external-ide
headless-mode
implicit-grant-flow
invalid
missing-endpoint
pr-welcome
private-api
pull-request
question
spotipy3
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/spotipy#535
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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'