8000 [BUG]: Unexpected renderer encountered. · Issue #1784 · pytube/pytube · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

[BUG]: Unexpected renderer encountered. #1784

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

Closed
Feli05 opened this issue Sep 4, 2023 · 1 comment
Closed

[BUG]: Unexpected renderer encountered. #1784

Feli05 opened this issue Sep 4, 2023 · 1 comment
Labels

Comments

@Feli05
Copy link
Feli05 commented Sep 4, 2023

Describe the bug
When using the Search feature on a project, it will play just fine but an error pops up in the output.

To Reproduce
Please provide the following information:

  • Search term: heart to heart mac demarco
  • Code where the feature is implemented:

@bot.command()
async def play(ctx, *args):

if not args:
    await ctx.send("You forgot to send a YT url or the name of the song!")
else:
    input = ' '.join(args) 

    try:
        voice_client = ctx.message.guild.voice_client
        if not voice_client:
            await ctx.send("Bot is not connected to a voice channel.")
            return

        async with ctx.typing():
            print('About to create player for music.')

            if 'https://www.youtube.com' in input:
                link = YouTube(input).streams.filter(only_audio=True).get_audio_only() 
                yt = link
                url_or_search = True
            else: 
                search = Search(input).results[0].streams.filter(only_audio=True).get_audio_only()
                yt = search
                url_or_search = False

            print('Successfully created player!')
            voice_client.play(discord.FFmpegPCMAudio(yt.download(), options = '-vn'))
            response = spotify_info(ctx, yt.title, input, url_or_search)
        
        await ctx.send(embed=response)

        while voice_client.is_playing() or voice_client.is_paused():
            await sleep(1)

        await ctx.send(f'Song ended. Hope you enjoyed {ctx.message.author}!')

    except discord.ClientException:
        await ctx.send("Error: Bot is not connected to a voice channel.")

Expected behavior
I want a user to type in '!play + YT link or normal text' and then it plays the song in the voice channel. It works just fine, but the error pops up.

Output
Unexpected renderer encountered.
Renderer name: dict_keys(['reelShelfRenderer'])
Search term: heart to heart mac demarco
Please open an issue at https://github.com/pytube/pytube/issues and provide this log output.

System information

  • Python version: 3.11.0
  • Pytube version: 15.0.0
  • Command used to install pytube: 'pip install pytube'
@Feli05 Feli05 added the bug label Sep 4, 2023
@github-actions
Copy link
github-actions bot commented Sep 4, 2023

Thank you for contributing to PyTube. Please remember to reference Contributing.md

@Feli05 Feli05 closed this as completed Mar 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant
0