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

can network timeout tolerance be increased? #23

Open
kaefert opened this issue May 15, 2020 · 3 comments
Open

can network timeout tolerance be increased? #23

kaefert opened this issue May 15, 2020 · 3 comments

Comments

@kaefert
Copy link

kaefert commented May 15, 2020

couldn't find anything about it in the -h help text.

Crashed with this error while my network connection was flaky:

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 258, 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 225, 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 475, in load_link
    album_browser.load()
  File "/usr/lib/python2.7/dist-packages/spotify/album.py", line 264, 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
@lavolp3
Copy link
Owner

lavolp3 commented May 16, 2020

This is a problem with the api call. The timeout of the response cannot be changed.
It wouldn't make a difference either way.
What did you try to call?

@kaefert
Copy link
Author

kaefert commented May 16, 2020

just normal track downloading, but it succeeded at the second try. It was simply a network issue on my side.

I just wanted to ask if spotify-ripper could be made more tolerant to network problems and retry on such failures instead of crashing.

@lavolp3
Copy link
Owner

lavolp3 commented May 16, 2020

There is a variable for that but I believe it is inside the spotify code so not accessible from here. May be accessible via an api call.
Will have a look at it. You're invited to research that as well

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

2 participants