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

Caught blocking call to putrequest with args (<http.client.HTTPSConnection object at 0x7f7a65d760> #671

Open
kuteo-git opened this issue Dec 27, 2024 · 0 comments

Comments

@kuteo-git
Copy link

I'm writing a script to get the captions on youtube.

from pytubefix import YouTube

@service
def ytube():
    try:
        yt = YouTube('https://www.youtube.com/watch?v=-zXQhqVcKh0')
        caption = list(yt.captions)[0]
        log.info(f"Found captions: {caption}")
    except Exception as e:
        log.error(f"Exception: {str(e)}")

And I get an error here:
Exception: Caught blocking call to putrequest with args (<http.client.HTTPSConnection object at 0x7f7a65d760>, 'POST', '/youtubei/v1/player?prettyPrint=false') inside the event loop by custom integration 'pyscript' at custom_components/pyscript/eval.py, line 1571: return getattr(val, arg.attr). (offender: /usr/local/lib/python3.12/http/client.py, line 1347: self.putrequest(method, url, **skips)), please create a bug report at https://github.com/custom-components/pyscript/issues

Could you please help me solve this? Thanks so much

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

1 participant