SoCo: Spotify music_service search fails - AuthTokenExpired

Seems simple enough, am I doing something incorrectly?

from soco import SoCo
from soco.music_services import MusicService

device = SoCo("x.x.x.x")
service = MusicService('Spotify')
service.search(category='tracks', term='pinball')
Traceback (most recent call last):
  File "soco-0.11.1-py3.5.egg/soco/music_services/music_service.py", line 151, in call
  File "soco-0.11.1-py3.5.egg/soco/soap.py", line 310, in call
soco.soap.SoapFault: s:Client.AuthTokenExpired: AuthTokenExpired

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "sonos.py", line 10, in <module>
    service.search(category='tracks', term='pinball')
  File "soco-0.11.1-py3.5.egg/soco/music_services/music_service.py", line 715, in search
  File "soco-0.11.1-py3.5.egg/soco/music_services/music_service.py", line 182, in call
soco.exceptions.MusicServiceException: ('AuthTokenExpired', 's:Client.AuthTokenExpired')

And changing Spotify to Google Play Music

Traceback (most recent call last):
  File "sonos.py", line 10, in <module>
    service.search(category='tracks', term='pinball')
  File "soco-0.11.1-py3.5.egg/soco/music_services/music_service.py", line 715, in search
  File "soco-0.11.1-py3.5.egg/soco/music_services/music_service.py", line 146, in call
  File "soco-0.11.1-py3.5.egg/soco/music_services/music_service.py", line 111, in get_soap_header
  File "soco-0.11.1-py3.5.egg/soco/services.py", line 181, in _dispatcher
  File "soco-0.11.1-py3.5.egg/soco/services.py", line 408, in send_command
  File "soco-0.11.1-py3.5.egg/soco/services.py", line 469, in handle_upnp_error
soco.exceptions.SoCoUPnPException: UPnP Error 8009 received:  from x.x.x.x

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Comments: 19 (9 by maintainers)

Most upvoted comments

Hi, any updates on this issue?