mirror of
https://github.com/spotipy-dev/spotipy.git
synced 2026-04-27 00:25:54 +03:00
[GH-ISSUE #209] AttributeError: 'SpotifyClientCredentials' object has no attribute 'is_token_expired' #106
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#106
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 @ritiek on GitHub (Aug 23, 2017).
Original GitHub issue: https://github.com/spotipy-dev/spotipy/issues/209
I successfully authenticated via
spotipy.oauth2.SpotifyClientCredentials(). The docs say calling methodis_token_expired()on it should be valid but it gives:However, calling
get_access_token()works fine.What is wrong with
is_token_expired()?@roblescoulter commented on GitHub (Oct 17, 2017):
Hello, I'm having the same issue. Were you able to solve it @ritiek ?
@ritiek commented on GitHub (Oct 17, 2017):
I am using a
tryexceptblock as an alternative. Something like below to refresh the token once it expires.@ritiek commented on GitHub (Oct 17, 2017):
As a matter of fact, I just noticed that
is_token_expired()is available only when usingspotipydirectly from the master branch.It can be used with:
As an alternative for old versions on pip, just make a small function (copying this from the master branch):
Closing this issue.