Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error when ripping playlist #15

Open
samithaj opened this issue Feb 15, 2017 · 17 comments
Open

error when ripping playlist #15

samithaj opened this issue Feb 15, 2017 · 17 comments

Comments

@samithaj
Copy link

samithaj commented Feb 15, 2017

I get this error when ripping some playlists (about 30 songs) - other playlist get ripped ok
I copied the playlist to a text file and removed local files but the issue is same
tried 2.10.7 but same error

edit: when i extracted URI's to a txt file and gave it, same error , so somehow URI's are bugged??
playlist: spotify:user:1242336789:playlist:2NmS6p9TTWqXGUykZ2QZAH

Exception in thread SpotifyRipperThread:
Traceback (most recent call last):
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/threading.py", line 810, in __bootstrap_inner
    self.run()
  File "/Library/Python/2.7/site-packages/spotify_ripper-2.10.7-py2.7.egg/spotify_ripper/ripper.py", line 233, in run
    audio_file = self.format_track_path(idx, track)
  File "/Library/Python/2.7/site-packages/spotify_ripper-2.10.7-py2.7.egg/spotify_ripper/ripper.py", line 618, in format_track_path
    format_track_string(self, args.format.strip(), idx, track)
  File "/Library/Python/2.7/site-packages/spotify_ripper-2.10.7-py2.7.egg/spotify_ripper/utils.py", line 233, in format_track_string
    [artist.name for artist in track.artists])))
TypeError: sequence item 1: expected string or Unicode, NoneType found
@samithaj
Copy link
Author

samithaj commented Mar 13, 2017

hey you can chain single download commands with "&&"
sudo spotify-ripper -l spotify:track:57JNg9mhfUrnwVPCVRXAGD && sudo spotify-ripper -l spotify:track:57JNg9mhfUrnwVPCVRXAGD ..............
Just select all a playlist and copy paste to text editor and use find and replace to make the command list
also you may need to increase sudo password remember timeout if you want download long playlist
http://lifehacker.com/make-sudo-sessions-last-longer-in-linux-1221545774

@apps9999
Copy link

Chain download for single file and album works for me. Never could get playlist download working yet.
Is there a workaround ?

@hbashton
Copy link
Owner

hbashton commented Mar 15, 2017 via email

@apps9999
Copy link

root@qq-VirtualBox:~# sudo spotify-ripper -u USERNAME spotify:user:spotify:playlist:3rgsDhGHZxZ9sB9DQWQfuf

Spotify Ripper - v2.9.1
Encoding output: MP3, VBR 0
Spotify bitrate: 320 kbps
Unicode support: ASCII only
Output directory: /home/qq/Music
Settings directory: /home/qq/.spotify-ripper
Format String: {artist}/{album}/{artist}-{track_name}.{ext}
Overwrite files: No
Logging in...
Logged in as USERNAME
Loading playlist...
Exception in thread SpotifyRipperThread:
Traceback (most recent call last):
File "/usr/lib/python2.7/threading.py", line 801, in __bootstrap_inner
self.run()
File "/usr/local/lib/python2.7/dist-packages/spotify_ripper-2.9.1-py2.7.egg/spotify_ripper/ripper.py", line 223, in run
tracks = list(get_tracks_from_uri(uri))
File "/usr/local/lib/python2.7/dist-packages/spotify_ripper-2.9.1-py2.7.egg/spotify_ripper/ripper.py", line 218, in get_tracks_from_uri
return self.load_link(uri)
File "/usr/local/lib/python2.7/dist-packages/spotify_ripper-2.9.1-py2.7.egg/spotify_ripper/ripper.py", line 431, in load_link
self.current_playlist.load()
File "/usr/lib/python2.7/dist-packages/spotify/playlist.py", line 118, in load
return utils.load(self._session, self, timeout=timeout)
File "/usr/lib/python2.7/dist-packages/spotify/utils.py", line 246, in load
raise spotify.Timeout(timeout)
Timeout: Operation did not complete in 10.000s

@hbashton
Copy link
Owner

hbashton commented Mar 15, 2017 via email

@samithaj
Copy link
Author

donno if this is the latest source, what i use is Spotify Ripper - v2.10.7
https://drive.google.com/file/d/0By2FZyNUC71iV3Q2NjQzOHdFXzA/view?usp=drive_web
found it on :#2

none of the versions in https://github.com/tmerten/spotify-ripper/network work for me for playlist download

@hbashton
Copy link
Owner

hbashton commented Mar 17, 2017 via email

@SolidHal
Copy link

I'm getting the same error running version 2.10.5 from the old repo, single and chained downloads function properly.

Spotify Ripper - v2.10.5
Encoding output: MP3, VBR 0
Spotify bitrate: 320 kbps
Unicode support: ASCII only
Output directory: /SpotifyRipper/OtherUsers/user
Settings directory: /root/.spotify-ripper
Format String: {artist} - {track_name}.{ext}
Overwrite files: No
Logging in...
Logged in as USERNAME
Loading playlist...
Exception in thread SpotifyRipperThread:
Traceback (most recent call last):
File "/usr/lib/python3.4/threading.py", line 920, in _bootstrap_inner
self.run()
File "/usr/local/lib/python3.4/dist-packages/spotify_ripper/ripper.py", line 228, in run
tracks = list(get_tracks_from_uri(uri))
File "/usr/local/lib/python3.4/dist-packages/spotify_ripper/ripper.py", line 223, in get_tracks
_from_uri
return self.load_link(uri)
File "/usr/local/lib/python3.4/dist-packages/spotify_ripper/ripper.py", line 442, in load_link
self.current_playlist.load(args.timeout)
File "/usr/local/lib/python3.4/dist-packages/spotify/playlist.py", line 118, in load
return utils.load(self._session, self, timeout=timeout)
File "/usr/local/lib/python3.4/dist-packages/spotify/utils.py", line 246, in load
raise spotify.Timeout(timeout)
spotify.error.Timeout: Operation did not complete in 60.000s

@hbashton I assume you;re running the latest version from this repo? Also, what version of python do you run yours with? It looks like both 3.4 and 2.7 have this error so I doubt it's python related, but who knows.

@DevMiKeCL
Copy link

DevMiKeCL commented Mar 21, 2017

there is a trouble about playlist parsing

but... i don't know how fix it in the code

sorry my english

may be this link help

http://tootallnate.github.io/spotify-uri/

https://developer.spotify.com/web-api/get-playlists-tracks/

@SolidHal
Copy link

I'm working on a hack to use the web api to empty the playlist after it is ripped and to pulled the tracks to create track objects without needing to load the playlist. The removal I've got working and the track pulling I'll have working tonight. It seems as this api gets older eventually we could lose the play functionality all together. Once that happens this project will be dead as the web api doesn't have a way to listen to full songs (30 second preview only). Spotify has been silent on this for years spotify/web-api#57

@hbashton if you have this working, could you share what version of this package you are using as well as the version of python and pyspotify? The size of your playlist and if you're comfortable, the playlist link or it's contents would be helpful in tracking down this bug since many users are unable to get this to work.

@deerhunter91
Copy link

All newly created playlists no longer work for me. I get timeout errors. Even if they have only one song in them.

Some old playlists still work.

It seems like Spotify has made, or are making, changes to how playlists are loaded

mopidy-spotify users reported this issue, then it appeared to just go away and it was concluded that Spotify servers were having problems ...

mopidy/mopidy-spotify#127

But it also seems that the API is being changed

mopidy/mopidy-spotify#130

Also see these issues ...

#10

mopidy/mopidy-spotify#133

@SolidHal
Copy link

I've posted a webAPI based fix for the playlist issue as well as the remove from playlist issue. Since my branch is based on version 2.10.5 of jrnewels spotify-ripper it would be a great amount of time and effort to merge these two forks. Feel free to merge my changes over @hbashton if you'd like
https://github.com/SolidHal/spotify-ripper

@deerhunter91
Copy link

@SolidHal thank you.

@deerhunter91
Copy link

deerhunter91 commented Mar 29, 2017

@SolidHal you have not enabled Issues in your fork, so I can't submit an issue, but running your fork (after installing spotipy). I get this error:

$ spotify-ripper
Traceback (most recent call last):
File "/usr/local/bin/spotify-ripper", line 9, in
load_entry_point('spotify-ripper==2.10.5', 'console_scripts', 'spotify-ripper')()
File "/usr/local/lib/python2.7/site-packages/pkg_resources/init.py", line 542, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/usr/local/lib/python2.7/site-packages/pkg_resources/init.py", line 2569, in load_entry_point
return ep.load()
File "/usr/local/lib/python2.7/site-packages/pkg_resources/init.py", line 2229, in load
return self.resolve()
File "/usr/local/lib/python2.7/site-packages/pkg_resources/init.py", line 2235, in resolve
module = import(self.module_name, fromlist=['name'], level=0)
File "/usr/local/bin/main.py", line 4, in
import('pkg_resources').run_script('spotify-ripper==2.10.5', 'main.py')
File "/usr/local/lib/python2.7/site-packages/pkg_resources/init.py", line 719, in run_script
self.require(requires)[0].run_script(script_name, ns)
File "/usr/local/lib/python2.7/site-packages/pkg_resources/init.py", line 1504, in run_script
exec(code, namespace, namespace)
File "/usr/local/lib/python2.7/site-packages/spotify_ripper-2.10.5-py2.7.egg/EGG-INFO/scripts/main.py", line 7, in
from spotify_ripper.ripper import Ripper
File "/usr/local/lib/python2.7/site-packages/spotify_ripper-2.10.5-py2.7.egg/spotify_ripper/ripper.py", line 10, in
from spotify_ripper.post_actions import PostActions
File "/usr/local/lib/python2.7/site-packages/spotify_ripper-2.10.5-py2.7.egg/spotify_ripper/post_actions.py", line 12, in
from spotify_ripper.remove_all_from_playlist import remove_all_from_playlist
File "/usr/local/lib/python2.7/site-packages/spotify_ripper-2.10.5-py2.7.egg/spotify_ripper/remove_all_from_playlist.py", line 9, in
print(os.environ["test"])
File "/usr/local/Cellar/python/2.7.12/Frameworks/Python.framework/Versions/2.7/lib/python2.7/UserDict.py", line 40, in getitem
raise KeyError(key)
KeyError: 'test'

@SolidHal
Copy link

Whoops, forgot to remove that test environment variable. It's all fixed now and issues are enabled @deerhunter91

@animatenate
Copy link

@SolidHal Thank you for this workaround! Got everything working again now:)

@DevMiKeCL
Copy link

work again and i did do nothing, only update to 2.10.7 and delete settings, offline.bnk, user-cache.bnk files and login again

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants