Open theNailz opened 11 years ago
Thanks @theNailz, I was about to give up and found your info. I got it working on OS X Mavericks. :dancer:
@atmos love some instructions on how you installed the dependencies on osx. I installed all dependencies mentioned in the README. However I get the following error:
Traceback (most recent call last):
File "./jbripper.py", line 5, in <module>
from spotify import Link, Image
ImportError: No module named spotify
Nevermind. Fixed it by running:
PYTHONPATH=/usr/local/lib/python2.7/site-packages ./jbripper.py user pass spotify:user:[user]:playlist:7HC9PMdSbwGBBn3EVTaCNx
I'm still a Python noob!
Hi! What version of python are you using on this? 2.7? I'm on debian 7.2 with python 2.7, I've installed everything. When I try to run it, I get: Loggin in! Unable to connect to spotify Logged out! Is there a problem with pyspotify or am I missing something? Tried running with python 3 on a fresh new VM debian 7.2, but I get syntax errors
There must be a problem with using this code and latest pyspotify:
Traceback (most recent call last): File "./jbripper.py", line 6, in
from jukebox import Jukebox, container_loaded File "/home/spotify/jukebox.py", line 10, in from spotify import ArtistBrowser, Link, ToplistBrowser, SpotifyError ImportError: cannot import name ToplistBrowser
@fr34kyn01535 The latest pyspotify is incompatible. Install the v1.11 version:
sudo pip uninstall pyspotify
sudo pip install pyspotify==1.11
And try again.
Works flawless on Ubuntu 14.04, thank you!
Latest build instructions for Debian 7.6 (wheezy) 3.2.60 x86_64
:
sudo apt-get install python-pip python-dev lame build-essential libffi-dev unzip
wget https://developer.spotify.com/download/libspotify/libspotify-12.1.51-Linux-x86_64-release.tar.gz
tar vzxf libspotify-12.1.51-Linux-x86_64-release.tar.gz
cd libspotify-12.1.51-Linux-x86_64-release/
sudo make install prefix=/usr/local
cd ..
sudo pip install -U pyspotify==1.11 eyeD3
wget https://github.com/robbeofficial/spotifyripper/archive/master.zip
unzip master.zip
cd spotifyripper-master/
cp /HOME/USERNAME/spotify_appkey.key .
./jbripper.py
For other platforms or 32 bit, use the appropriate libspotify.
Hi Nailz, I've tried the latest build instructions on a clean debian install (32bit ) Everything installs correctly like before, but I still get "Logging in, please wait... Can not connect to spotify Logged out!" Strange...
Do the pyspotify examples give errors as well?
git clone --branch v1.x/master https://github.com/mopidy/pyspotify.git
cd pyspotify
cp /home/user/spotify_appkey.key .
python jukebox.py -u username -p password
jukebox> ls
<should display your playlists>
If this has problems too, it looks like something is wrong with pyspotify on your system, or the connection between you and Spotify is being rejected. (A firewall perhaps?)
Thanks for the help nailz, unfortunately that doesn't work either, but I'm presuming it's the firewall where I'm at. I'll try it later from home. EDIT: yeah it was actually my virtual machine. Since adapter was on NAT through my own adapter it wasn't reachable probably. Just switched to bridged mode and it was ok. Thanks again
I'm running OSX Mavericks and keep getting
Traceback (most recent call last):
File "./jbripper.py", line 25, in <module>
from jukebox import Jukebox, container_loaded
File "/Users/spotifyripper/jukebox.py", line 10, in <module>
from spotify import ArtistBrowser, Link, Playlist, ToplistBrowser, SpotifyError
ImportError: cannot import name ToplistBrowser
Any idea what's wrong?
Yes, If you would just read the comments before ~
sudo pip uninstall pyspotify sudo pip install pyspotify==1.11
Thanks, although I'm still having issues. Here is what I am doing on OS X:
$ cd /Users/libspotify-12.1.51-Darwin-universal
$ sudo pip install -U pyspotify==1.11
$ sudo pip install eyeD3 --allow-external eyeD3 --allow-unverified eyeD3
$ cd /Users/spotifyripper
$ ./jbripper.py [username] [password] spotify:track:52xaypL0Kjzk0ngwv3oBPR
But this results in:
Traceback (most recent call last):
File "./jbripper.py", line 24, in <module>
from spotify import Link, Image
ImportError: No module named spotify
Check the 3rd and 4th comment in this issue.
Check the 3rd and 4th comment in this issue.
Thanks @theNailz! But unfortunately that fix didn't do it.
I ran:
PYTHONPATH=/usr/local/lib/python2.7/site-packages ./jbripper.py [username] [password] spotify:track:52xaypL0Kjzk0ngwv3oBPR
But still got:
Traceback (most recent call last):
File "./jbripper.py", line 24, in <module>
from spotify import Link, Image
ImportError: No module named spotify
i get this error when trying to install it...
wget https://github.com/mopidy/pyspotify/tarball/develop#egg=pyspotify-dev tar vzxf develop
$ wget https://github.com/mopidy/pyspotify/tarball/develop#egg=pyspotify-dev --2014-12-07 20:24:55-- https://github.com/mopidy/pyspotify/tarball/develop Resolving github.com (github.com)... 192.30.252.128 Connecting to github.com (github.com)|192.30.252.128|:443... connected. HTTP request sent, awaiting response... 302 Found Location: https://codeload.github.com/mopidy/pyspotify/legacy.tar.gz/develop [following] --2014-12-07 20:24:55-- https://codeload.github.com/mopidy/pyspotify/legacy.tar.gz/develop Resolving codeload.github.com (codeload.github.com)... 192.30.252.146 Connecting to codeload.github.com (codeload.github.com)|192.30.252.146|:443... connected. HTTP request sent, awaiting response... 404 Not Found 2014-12-07 20:24:56 ERROR 404: Not Found.
Got it working for me by following theNailz instructions at the top but needed to change a few things.
My system:
- Ubuntu Server 12.04 x86
- Managing remotely via SSH
-----------------------------------------------------
# Go home!
cd ~
# My addition: Make sure system is fully updated
sudo apt-get update && sudo apt-get upgrade -y && sudo apt-get dist-upgrade -y
# Install libspotify
wget https://developer.spotify.com/download/libspotify/libspotify-12.1.51-Linux-i686-release.tar.gz
tar vzxf libspotify-12.1.51-Linux-i686-release.tar.gz
cd libspotify-12.1.51-Linux-i686-release/
sudo make install prefix=/usr/local
cd ..
# Fetch spotifyripper
wget https://github.com/robbeofficial/spotifyripper/archive/master.zip
unzip master.zip
# Worked for me !
--------------------------------
# Install pyspotify-dev
wget https://github.com/mopidy/pyspotify/tarball/develop#egg=pyspotify-dev
tar vzxf develop
# THIS DID NOT WORK. The link is no longer available. I found instructions from source. https://pyspotify.mopidy.com/en/latest/installation/
sudo apt-get install build-essential python-dev python3-dev libffi-dev
sudo pip install pyspotify
--------------------------------
# Install mopidy apt source
wget -q -O - https://apt.mopidy.com/mopidy.gpg | sudo apt-key add -
sudo wget -q -O /etc/apt/sources.list.d/mopidy.list https://apt.mopidy.com/mopidy.list
# This worked for me!
----------------------------------------------
# Copy the jukebox dependency
cd spotifyripper-master/
cp ../mopidy-pyspotify-ef75737/examples/jukebox.py . # NO GO. I don't know what this is but it wasn't on my system.
mv /YOUR/PATH/TO/spotify_appkey.key . # I just copied my key to ~/spotifyripper-master/
cd ..
-----------------------------------------------
# Install dependencies and tools: SEE NOTE BELOW
sudo apt-get update
sudo apt-get install mopidy python-spotify lame eyed3
# This may have already been done but I did it again anyway!
# Let it rip
cd spotifyripper-master/
screen ./jbripper.py <username> <password> <playlist|track> # What the hell is screen?? umm... I removed that.
# THIS DOESN'T WORK. Another comment mentioned:
sudo pip uninstall pyspotify
sudo pip install pyspotify==1.11
# Also,
<username> <password> will EACH need to be surrounding by quotes.
# AFTER doing this everything is now working perfectly.
Hopes this helps someone.
very nice ill follow that
what is the error? http://pastebin.com/kVV3J9WY thx
Getting this error when trying to run the command.. I am really not a pro, so any help appreciated! im on a New macbook pro 10.10.3
./jbripper.py USER PASSWORD spotify:user:USER:playlist:1CbyNAS5iGcHA8EsQcszIE
Traceback (most recent call last):
File "./jbripper.py", line 6, in
Tried to use spotify.audiosink.oss.OssSink as audio sink, but failed:
Traceback (most recent call last):
File "/Library/Python/2.7/site-packages/spotify/audiosink/init.py", line 36, in import_audio_sink
module = import(module, fromlist=[cls])
File "/Library/Python/2.7/site-packages/spotify/audiosink/oss.py", line 1, in
Tried to use spotify.audiosink.portaudio.PortAudioSink as audio sink, but failed:
Traceback (most recent call last):
File "/Library/Python/2.7/site-packages/spotify/audiosink/init.py", line 36, in import_audio_sink
module = import(module, fromlist=[cls])
File "/Library/Python/2.7/site-packages/spotify/audiosink/portaudio.py", line 1, in
Tried to use spotify.audiosink.gstreamer.GstreamerSink as audio sink, but failed:
Traceback (most recent call last):
File "/Library/Python/2.7/site-packages/spotify/audiosink/init.py", line 36, in import_audio_sink
module = import(module, fromlist=[cls])
File "/Library/Python/2.7/site-packages/spotify/audiosink/gstreamer.py", line 4, in
Was not able to import any of the audio sinks
Thanks to theNailz and Geogboe! I had to follow both instructions to finally get it working. Very Nice!
Hi,
I get the following error message while execute ./jbripper.py [username] [password] spotify:track:52xaypL0Kjzk0ngwv3oBPR
Traceback (most recent call last):
File "./jbripper.py", line 5, in
Before I got the following error message trying to install sudo pip install pyspotify
Command /usr/bin/python -c "import setuptools, tokenize;file='/tmp/pip-build-RYaJST/pyspotify/setup.py';exec(compile(getattr(tokenize, 'open', open)(file).read().replace('\r\n', '\n'), file, 'exec'))" install --record /tmp/pip-ObV5Za-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /tmp/pip-build-RYaJST/pyspotify Storing debug log for failure in /root/.pip/pip.log
Can anyone help me?
Here is my install history, cleaned up and documented for howto/wiki/readme purposes.
Installed on Debian 6.0 Linux 2.6.32-5-686 i686 GNU/Linux