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

[Bug]: Logging issue with yt-dlp #394

Open
3 tasks done
hmurari opened this issue Apr 24, 2024 · 2 comments
Open
3 tasks done

[Bug]: Logging issue with yt-dlp #394

hmurari opened this issue Apr 24, 2024 · 2 comments
Assignees
Labels
BUG 🐛 Vidgear api's error, flaw or fault BUG CONFIRMED ✅ Bug is confirmed! WORK IN PROGRESS 🚧 currently been worked on.
Milestone

Comments

@hmurari
Copy link

hmurari commented Apr 24, 2024

Description

While initializing logging backend, the following code is used:

# define default options for yt-dlp backend self.ydl_opts = { "format": "best*[vcodec!=none]", "quiet": True, "prefer_insecure": False, "no_warnings": True if logging else False, "dump_single_json": True, "extract_flat": True, "skip_download": True, }

However, no_warnings should be the other way round.

no_warnings: False if logging else True

Issue Checklist

  • I have searched open or closed issues for my problem and found nothing related or helpful.
  • I have read the Documentation and found nothing related to my problem.
  • I've read the Issue Guidelines and wholeheartedly agree.

Expected behaviour

Should be like this:

# define default options for yt-dlp backend self.ydl_opts = { "format": "best*[vcodec!=none]", "quiet": True, "prefer_insecure": False, "no_warnings": False if logging else True, "dump_single_json": True, "extract_flat": True, "skip_download": True, }

Actual behaviour

With logging = False, I see warning messages from YT-DLP.
With logging = True, I don't see warning messages from YT-DLP

Steps to reproduce

Open any youtube stream

Terminal log output

While using CamGear(logging=False)

WARNING: [youtube] YouTube said: ERROR - Precondition check failed.
WARNING: [youtube] HTTP Error 400: Bad Request. Retrying (1/3)...
WARNING: [youtube] YouTube said: ERROR - Precondition check failed.
WARNING: [youtube] HTTP Error 400: Bad Request. Retrying (2/3)...
WARNING: [youtube] YouTube said: ERROR - Precondition check failed.
WARNING: [youtube] HTTP Error 400: Bad Request. Retrying (3/3)...
WARNING: [youtube] YouTube said: ERROR - Precondition check failed.
WARNING: [youtube] Unable to download API page: HTTP Error 400: Bad Request (caused by <HTTPError 400: Bad Request>); please report this issue on  https://github.com/yt-dlp/yt-dlp/issues?q= , filling out the appropriate issue template. Confirm you are on the latest version using  yt-dlp -U

Python Code(Optional)

No response

VidGear Version

0.3.2

Python version

3.10

OpenCV version

4.2

Operating System version

Ubuntu 22.04

Any other Relevant Information?

N/A

@hmurari hmurari added the BUG 🐛 Vidgear api's error, flaw or fault label Apr 24, 2024
Copy link

welcome bot commented Apr 24, 2024

Thanks for opening this issue, a maintainer will get back to you shortly!

In the meantime:

  • Read our Issue Guidelines, and update your issue accordingly. Please note that your issue will be fixed much faster if you spend about half an hour preparing it, including the exact reproduction steps and a demo.
  • Go comprehensively through our dedicated FAQ & Troubleshooting section.
  • For any quick questions and typos, please refrain from opening an issue, as you can reach us on Gitter community channel.

@abhiTronix
Copy link
Owner

@hmurari Good catch. I'll fix it :)

@abhiTronix abhiTronix added BUG CONFIRMED ✅ Bug is confirmed! WORK IN PROGRESS 🚧 currently been worked on. labels Apr 25, 2024
@abhiTronix abhiTronix added this to To do in VidGear v0.3.3 via automation Apr 25, 2024
@abhiTronix abhiTronix added this to the v0.3.3 milestone Apr 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BUG 🐛 Vidgear api's error, flaw or fault BUG CONFIRMED ✅ Bug is confirmed! WORK IN PROGRESS 🚧 currently been worked on.
Projects
Development

No branches or pull requests

2 participants