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

Running bot as .pyw prevents music from playing #120

Open
dille12 opened this issue Dec 14, 2022 · 2 comments
Open

Running bot as .pyw prevents music from playing #120

dille12 opened this issue Dec 14, 2022 · 2 comments

Comments

@dille12
Copy link

dille12 commented Dec 14, 2022

I changed the run file to a no console .pyw, and all music related commands stopped working. I believe the issue is in FFMPEG conversion, which crashes if console is not present, since I found this: Zulko/moviepy#517.

@dille12
Copy link
Author

dille12 commented Dec 14, 2022

Actually the downloader.extract_info() returns nothing when not using the console in this section:

try:
downloader = yt_dlp.YoutubeDL(
{'format': 'bestaudio', 'title': True, "cookiefile": config.COOKIE_PATH})
try:
r = downloader.extract_info(
track, download=False)
except Exception as e:
if "ERROR: Sign in to confirm your age" in str(e):
return None
except:
downloader = yt_dlp.YoutubeDL(
{'title': True, "cookiefile": config.COOKIE_PATH})
r = downloader.extract_info(
track, download=False)

It causes the thread to crash.

@solaluset
Copy link

Thanks for the detailed report on this issue. I've attempted to fix it in my fork, seems to work.

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