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

fix(node): ignore no content responses #54

Merged
merged 1 commit into from
Feb 17, 2023
Merged

Conversation

ooliver1
Copy link
Owner

Summary

Should resolve all issues like the following:

Ignoring exception in command <nextcord.application_command.SlashApplicationCommand object at 0x0000012B6C8E06A0>:
Traceback (most recent call last):
  File "C:\Users\Cattosarus\AppData\Local\Programs\Python\Python39\lib\site-packages\nextcord\application_command.py", line 863, in invoke_callback_with_hooks
    await self(interaction, *args, **kwargs)
  File "c:\Users\Cattosarus\Desktop\mafic-bot\cogs\music.py", line 319, in destroy
    await player.destroy()
  File "C:\Users\Cattosarus\AppData\Local\Programs\Python\Python39\lib\site-packages\mafic\player.py", line 430, in destroy
    await self._node.destroy(guild_id=self.guild.id)
  File "C:\Users\Cattosarus\AppData\Local\Programs\Python\Python39\lib\site-packages\mafic\node.py", line 871, in __request
    json = await resp.json(loads=loads)
  File "C:\Users\Cattosarus\AppData\Local\Programs\Python\Python39\lib\site-packages\aiohttp\client_reqrep.py", line 1104, in json
    raise ContentTypeError(
aiohttp.client_exceptions.ContentTypeError: 0, message='Attempt to decode JSON with unexpected mimetype: ', url=URL('https://node2.lewdhutao.tech:443/v3/sessions/4m8s81tmqk2bfc2p/players/1071227694685110343')

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

nextcord.errors.ApplicationInvokeError: Command raised an exception: ContentTypeError: 0, message='Attempt to decode JSON with unexpected mimetype: ', url=URL('https://node2.lewdhutao.tech:443/v3/sessions/4m8s81tmqk2bfc2p/players/1071227694685110343')

Checklist

  • If code changes were made then they have been tested.
  • I have run task lint to format code and my changes.
  • I have run task pyright and fixed the relevant issues.

@ooliver1 ooliver1 added t: bug Type: bug - something isn't working p: high Priority: high - should be worked on as soon as reasonable labels Feb 17, 2023
@ooliver1 ooliver1 enabled auto-merge (squash) February 17, 2023 20:20
@ooliver1 ooliver1 merged commit 8a13874 into master Feb 17, 2023
@ooliver1 ooliver1 deleted the fix/destroy-error branch February 17, 2023 20:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
p: high Priority: high - should be worked on as soon as reasonable t: bug Type: bug - something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant