mental32 / spotify.py

🌐 API wrapper for Spotify 🎶
https://spotifypy.readthedocs.io/en/latest/
MIT License
150 stars 38 forks source link

Spotify.Player Resume not working. #10

Closed ghost closed 5 years ago

ghost commented 5 years ago

When invoking .resume() on the Spotify.Player object, I recieve the following error:

  File "/Users//github/SpotiTerm-Rewrite/general.py", line 157, in controls
    _player.resume(device=chosen_device.id)
  File "/Users//.local/share/virtualenvs/SpotiTerm-Rewrite-5Ht0qwiq/lib/python3.7/site-packages/spotify/sync/models.py", line 42, in wrapper
    func(self, *args, **kwargs)
  File "/Users//.local/share/virtualenvs/SpotiTerm-Rewrite-5Ht0qwiq/lib/python3.7/site-packages/spotify/sync/thread.py", line 73, in run_coro
    raise err
  File "/Users//.local/share/virtualenvs/SpotiTerm-Rewrite-5Ht0qwiq/lib/python3.7/site-packages/spotify/models/player.py", line 93, in resume
    await self.user.http.play_playback(None, device_id=str(device))
  File "/Users//.local/share/virtualenvs/SpotiTerm-Rewrite-5Ht0qwiq/lib/python3.7/site-packages/spotify/http.py", line 1078, in play_playback
    f"`context_uri` must be a string or an iterable object, got {type(context_uri)}"
TypeError: `context_uri` must be a string or an iterable object, got <class 'NoneType'>
mental32 commented 5 years ago

@Dextroz Thanks for reporting this, I have just issued a fix to the v0.5.0 branch; let me know if there are any more issues :+1: