mirror of
https://github.com/sigma67/ytmusicapi.git
synced 2026-04-25 15:26:01 +03:00
[GH-ISSUE #464] Setting a custom timeout does not work... #343
Labels
No labels
a/b
bug
documentation
enhancement
good first issue
help wanted
invalid
pull-request
question
wontfix
yt-error
yt-update
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/ytmusicapi#343
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @TheWicklowWolf on GitHub (Oct 23, 2023).
Original GitHub issue: https://github.com/sigma67/ytmusicapi/issues/464
Describe the bug
Setting a custom timeout has no effect and I still get
('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))Also in the docs it states
ytm = YTMusic(session=s)however,sessionis incorrect. I think it should berequests_session.To Reproduce
@sigma67 commented on GitHub (Oct 24, 2023):
Is your error even timeout related? It basically just takes your session and uses it:
github.com/sigma67/ytmusicapi@05a5fb8153/ytmusicapi/ytmusic.py (L76-L77)Where did you see the wrong part in the docs? Please provide a link
@TheWicklowWolf commented on GitHub (Oct 24, 2023):
Here:
github.com/sigma67/ytmusicapi@05a5fb8153/ytmusicapi/ytmusic.py (L53-L55)And subsequently:
https://ytmusicapi.readthedocs.io/en/latest/reference.html#ytmusicapi.YTMusic.init
@TheWicklowWolf commented on GitHub (Oct 24, 2023):
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?
Great library by the way 👍
@sigma67 commented on GitHub (Oct 24, 2023):
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
@sigma67 commented on GitHub (Oct 24, 2023):
Feel free to submit a PR if you want
@TheWicklowWolf commented on GitHub (Oct 24, 2023):
Ok, thanks for the clarification!