3

SoCo is a Python library for controlling Sonos speakers. I'm trying to play a locally stored song:

device = SoCo("192.168.209.7")
device.play_uri("/home/myuser/mysong.ogg")

If I've read the docs correctly, mysong.ogg should start playing on the Sonos. However, this code immediately results in the following exception:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python3.4/site-packages/soco/core.py", line 95, in inner_function
    return function(self, *args, **kwargs)
  File "/usr/lib/python3.4/site-packages/soco/core.py", line 470, in play_uri
    ('CurrentURIMetaData', meta)
  File "/usr/lib/python3.4/site-packages/soco/services.py", line 156, in _dispatcher
    return self.send_command(action, *args, **kwargs)
  File "/usr/lib/python3.4/site-packages/soco/services.py", line 357, in send_command
    self.handle_upnp_error(response.text)
  File "/usr/lib/python3.4/site-packages/soco/services.py", line 417, in handle_upnp_error
    error_xml=xml_error
soco.exceptions.SoCoUPnPException: UPnP Error 714 received: Illegal MIME-Type from 192.168.209.7
  • Did you find a solution? – Zvika Jul 20 '16 at 21:23
  • 1
    @Zvika If it's still relevant, I never found a solution and ended up moving on to other projects. Sorry for the incredibly late answer. – Eric Daigle Apr 30 '17 at 00:49
  • Did anyone also run into this and ended up finding a solution? – Spherical Cowboy Sep 17 '17 at 21:44
  • 1
    This is a duplicate of https://stackoverflow.com/questions/29372297/how-could-play-a-song-in-my-computer-soco-python-sonos-controller-python/47610652#47610652 Please see my answer there. – gripsnarl Dec 02 '17 at 17:42
  • Does this answer your question? [How could play a song in my computer soco python (sonos controller python)](https://stackoverflow.com/questions/29372297/how-could-play-a-song-in-my-computer-soco-python-sonos-controller-python) – Stephan Sep 24 '21 at 22:31

0 Answers0