baiumbg / baiumbg-Cogs

A bunch of useless (and some questionably useful) cogs for Red-DiscordBot (V3)
MIT License
3 stars 10 forks source link

tts fails after update to 3.3.11 #20

Closed the0ckid82 closed 4 years ago

the0ckid82 commented 4 years ago

i believe this started failing when i updated to 3.3.10 but tried updating to 3.3.11 to see if it was fixed yet still get the same error when trying a tts command it responds Error in command 'tts'. Check your console or logs for details.

here is the info from the logs


Traceback (most recent call last):
  File "/root/redenv/lib/python3.8/site-packages/discord/ext/commands/core.py", line 83, in wrapped
    ret = await coro(*args, **kwargs)
  File "/root/.local/share/Red-DiscordBot/data/ock/cogs/CogManager/cogs/sfx/sfx.py", line 69, in tts
    await self._play_sfx(ctx.author.voice.channel, audio_file, True)
  File "/root/.local/share/Red-DiscordBot/data/ock/cogs/CogManager/cogs/sfx/sfx.py", line 294, in _play_sfx
    player = await lavalink.connect(vc)
  File "/root/redenv/lib/python3.8/site-packages/lavalink/lavalink.py", line 104, in connect
    node_ = node.get_node(channel.guild.id)
  File "/root/redenv/lib/python3.8/site-packages/lavalink/node.py", line 397, in get_node
    raise IndexError("No nodes found.")
IndexError: No nodes found.

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/root/redenv/lib/python3.8/site-packages/discord/ext/commands/bot.py", line 892, in invoke
    await ctx.command.invoke(ctx)
  File "/root/redenv/lib/python3.8/site-packages/discord/ext/commands/core.py", line 797, in invoke
    await injected(*ctx.args, **ctx.kwargs)
  File "/root/redenv/lib/python3.8/site-packages/discord/ext/commands/core.py", line 92, in wrapped
    raise CommandInvokeError(exc) from exc
discord.ext.commands.errors.CommandInvokeError: Command raised an exception: IndexError: No nodes found.```
baiumbg commented 4 years ago

Do other types of audio play (i.e. [p]play) or is it just tts that fails? My bot is running 3.3.10 and I haven't seen this issue.

the0ckid82 commented 4 years ago

just tried to play a youtube link and got connection to lavalink has failed and traceback shows


Traceback (most recent call last):
  File "/root/redenv/lib/python3.8/site-packages/discord/ext/commands/core.py", line 83, in wrapped
    ret = await coro(*args, **kwargs)
  File "/root/.local/share/Red-DiscordBot/data/ock/cogs/CogManager/cogs/sfx/sfx.py", line 169, in addsfx
    cfg_sounds = await self.config.guild(ctx.guild).sounds()
  File "/root/redenv/lib/python3.8/site-packages/redbot/core/config.py", line 976, in guild
    return self._get_base_group(self.GUILD, str(guild.id))
AttributeError: 'NoneType' object has no attribute 'id'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/root/redenv/lib/python3.8/site-packages/discord/ext/commands/bot.py", line 892, in invoke
    await ctx.command.invoke(ctx)
  File "/root/redenv/lib/python3.8/site-packages/discord/ext/commands/core.py", line 797, in invoke
    await injected(*ctx.args, **ctx.kwargs)
  File "/root/redenv/lib/python3.8/site-packages/discord/ext/commands/core.py", line 92, in wrapped
    raise CommandInvokeError(exc) from exc
discord.ext.commands.errors.CommandInvokeError: Command raised an exception: AttributeError: 'NoneType' object has no attribute 'id'```

i also tried adding a audio file to see if that would play and it resulted in the same traceback
baiumbg commented 4 years ago

This isn't related to the sfx cog - your instance of Red doesn't initialize a lavalink server and that's why it can't play any audio.

Try looking for help over at the Red discord server. Feel free to re-open this issue if you still have issues with sfx after fixing the lavalink problems.