Exceptions
|
Raised when the user decides to not grant access to the app |
Exceptional event happened during user authorization (including access denied by the user) |
|
|
Raised when the authorization procedure started but the function waiting for a response from the user (or the Spotify server) doesn’t get any response in |
|
Error during HTTP request. |
|
Raised when Spotipie catches that the scope of the session is not sufficient to carry out an API request before the actual request is made. |
|
Raised when the raiser expect a Spotify resource of some kind but gets another. |
Reference
Bases: spotipie.exceptions.SpotipieException
Error during HTTP request. It has a response
attribute.
Bases: spotipie.exceptions.SpotipieException
Raised when Spotipie catches that the scope of the session is not sufficient to carry out an API request before the actual request is made.
# Important notice
Please, note that not all the errors caused by insufficient scope can be caught before a
request is made: when this check is not possible and the scope is insufficient, an
:class:~spotipie.errors.HttpError` is raised instead. So, make sure you include HttpError
in your try-except
block whenever you want to catch insufficient scope errors.
This class is here to provide you a better feedback than HttpError
when this is possible.
Bases: spotipie.exceptions.SpotipieException
Raised when the raiser expect a Spotify resource of some kind but gets another.
Note: “type” here doesn’t refer to a Python type but to the type of a Python resource returned by Spotify API as a dictionary (contained in the “type” attribute of the dict).
Bases: spotipie.exceptions.AuthorizationException
Raised when the user decides to not grant access to the app
Bases: spotipie.exceptions.SpotipieException
Exceptional event happened during user authorization (including access denied by the user)
Bases: spotipie.exceptions.AuthorizationException
Raised when the authorization procedure started but the function waiting for a response from
the user (or the Spotify server) doesn’t get any response in timeout
seconds.