soco.exceptions module

Exceptions that are used by SoCo.

exception soco.exceptions.SoCoException[source]

Base class for all SoCo exceptions.

exception soco.exceptions.UnknownSoCoException[source]

An unknown UPnP error.

The exception object will contain the raw response sent back from the speaker as the first of its args.

exception soco.exceptions.SoCoUPnPException(message, error_code, error_xml, error_description='')[source]

A UPnP Fault Code, raised in response to actions sent over the network.

  • message (str) – The message from the server.
  • error_code (str) – The UPnP Error Code as a string.
  • error_xml (str) – The xml containing the error, as a utf-8 encoded string.
  • error_description (str) – A description of the error. Default is “”
exception soco.exceptions.CannotCreateDIDLMetadata[source]

Deprecated since version 0.11: Use DIDLMetadataError instead.

exception soco.exceptions.DIDLMetadataError[source]

Raised if a data container class cannot create the DIDL metadata due to missing information.

For backward compatibility, this is currently a subclass of CannotCreateDIDLMetadata. In a future version, it will likely become a direct subclass of SoCoException.

exception soco.exceptions.MusicServiceException[source]

An error relating to a third party music service.

exception soco.exceptions.UnknownXMLStructure[source]

Raised if XML with an unknown or unexpected structure is returned.

exception soco.exceptions.SoCoSlaveException[source]

Raised when a master command is called on a slave.

exception soco.exceptions.NotSupportedException[source]

Raised when something is not supported by the device