I try running the examples/play.py but it produces no output either in the terminal or from my speakers.
I have a premium account, and have tested that spotify-websocket-api works by getting several albums' metadata.
clients/respotify doesn't seem to work:
$ python respotify.py myusernae
Please enter your Spotify password
Traceback (most recent call last):
File "respotify.py", line 283, in
client.connect(host="localhost", port="6600")
File "/Library/Python/2.7/site-packages/mpd.py", line 491, in connect
self._sock = self._connect_tcp(host, port)
File "/Library/Python/2.7/site-packages/mpd.py", line 464, in _connect_tcp
raise err
socket.error: [Errno 61] Connection refused
I've tried adding 'print' statements to different functions within examples/play.py to see which blocks of code are running, but the only ones that show up are in the final if...else codeblock in play.py . There aren't even any error messages that show up, it just silently quits.
I've also tried changing the command play.py runs when it executes track_uri_callback() to something that I know works from the command line (with a known local file), but this still has no effect. Any ideas whats going on? Is this project out of date with the official spotify api? Or maybe I have too vague an understanding of what callbacks are?
A simple working example of retrieving a track's mp3 url would be extremely helpful.
On a macbook air:
$ uname -a
Darwin tmpname 13.0.0 Darwin Kernel Version 13.0.0: Thu Sep 19 22:22:27 PDT 2013; root:xnu-2422.1.72~6/RELEASE_X86_64 x86_64
I try running the examples/play.py but it produces no output either in the terminal or from my speakers.
I have a premium account, and have tested that spotify-websocket-api works by getting several albums' metadata.
clients/respotify doesn't seem to work: $ python respotify.py myusernae Please enter your Spotify password Traceback (most recent call last): File "respotify.py", line 283, in
client.connect(host="localhost", port="6600")
File "/Library/Python/2.7/site-packages/mpd.py", line 491, in connect
self._sock = self._connect_tcp(host, port)
File "/Library/Python/2.7/site-packages/mpd.py", line 464, in _connect_tcp
raise err
socket.error: [Errno 61] Connection refused
I've tried adding 'print' statements to different functions within examples/play.py to see which blocks of code are running, but the only ones that show up are in the final if...else codeblock in play.py . There aren't even any error messages that show up, it just silently quits.
I've also tried changing the command play.py runs when it executes track_uri_callback() to something that I know works from the command line (with a known local file), but this still has no effect. Any ideas whats going on? Is this project out of date with the official spotify api? Or maybe I have too vague an understanding of what callbacks are?
A simple working example of retrieving a track's mp3 url would be extremely helpful.
On a macbook air: $ uname -a Darwin tmpname 13.0.0 Darwin Kernel Version 13.0.0: Thu Sep 19 22:22:27 PDT 2013; root:xnu-2422.1.72~6/RELEASE_X86_64 x86_64
$ python --version Python 2.7.5