GithubHelp home page GithubHelp logo

Comments (6)

sigma67 avatar sigma67 commented on August 17, 2024

Is your error even timeout related? It basically just takes your session and uses it:

if isinstance(requests_session, requests.Session):
self._session = requests_session

Where did you see the wrong part in the docs? Please provide a link

from ytmusicapi.

TheWicklowWolf avatar TheWicklowWolf commented on August 17, 2024

Here:

s = requests.Session()
s.request = functools.partial(s.request, timeout=3)
ytm = YTMusic(session=s)

And subsequently:
https://ytmusicapi.readthedocs.io/en/latest/reference.html#ytmusicapi.YTMusic.__init__

from ytmusicapi.

TheWicklowWolf avatar TheWicklowWolf commented on August 17, 2024

Is your error even timeout related? It basically just takes your session and uses it:

I'm not sure, I thought if I set the session timeout then the connection should still be open. Maybe not, what else could cause this error?

Exception has occurred: ConnectionError
('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))
http.client.RemoteDisconnected: Remote end closed connection without response

During handling of the above exception, another exception occurred:

urllib3.exceptions.ProtocolError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))

Great library by the way 👍

from ytmusicapi.

sigma67 avatar sigma67 commented on August 17, 2024

Good catch on the docs issue.

Here's some info on your error: https://stackoverflow.com/questions/61303351/why-does-requests-session-get-raise-an-requests-exceptions-connectionerror-in

It's not an issue with the ytmusicapi implementation, you'll need to handle the error on your end

from ytmusicapi.

sigma67 avatar sigma67 commented on August 17, 2024

Feel free to submit a PR if you want

from ytmusicapi.

TheWicklowWolf avatar TheWicklowWolf commented on August 17, 2024

It's not an issue with the ytmusicapi implementation, you'll need to handle the error on your end

Ok, thanks for the clarification!

from ytmusicapi.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.