Error handling

exception spotify.Error[source]

A Spotify error.

This is the superclass of all custom exceptions raised by pyspotify.

class spotify.ErrorType(value)[source]
exception spotify.LibError(error_type)[source]

A libspotify error.

Where many libspotify functions return error codes that must be checked after each and every function call, pyspotify raises the LibError exception instead. This helps you to not accidentally swallow and hide errors when using pyspotify.

exception spotify.Timeout(timeout)[source]

Exception raised by an operation not completing within the given timeout.