staciax / valorant-discord-bot

A discord bot with valorant api.
GNU General Public License v3.0
338 stars 201 forks source link

login error #104

Open torunoya opened 1 year ago

torunoya commented 1 year ago

valorant-bot | Task exception was never retrieved valorant-bot | future: <Task finished name='CommandTree-invoker' coro=<CommandTree._from_interaction..wrapper() done, defined at /usr/local/lib/python3.10/dist-packages/discord/app_commands/tree.py:1087> exception=ValueError('Both or neither of value and tb must be given')> valorant-bot | Traceback (most recent call last): valorant-bot | File "/usr/local/lib/python3.10/dist-packages/discord/app_commands/commands.py", line 850, in _do_call valorant-bot | return await self._callback(self.binding, interaction, **params) # type: ignore valorant-bot | File "/app/cogs/valorant.py", line 93, in login valorant-bot | authenticate = await auth.authenticate(username, password) valorant-bot | File "/app/utils/valorant/auth.py", line 122, in authenticate valorant-bot | data = await r.json() valorant-bot | File "/usr/local/lib/python3.10/dist-packages/aiohttp/client_reqrep.py", line 1104, in json valorant-bot | raise ContentTypeError( valorant-bot | aiohttp.client_exceptions.ContentTypeError: 0, message='Attempt to decode JSON with unexpected mimetype: text/html; charset=utf-8', url=URL('https://auth.riotgames.com/api/v1/authorization') valorant-bot | valorant-bot | The above exception was the direct cause of the following exception: valorant-bot | valorant-bot | Traceback (most recent call last): valorant-bot | File "/usr/local/lib/python3.10/dist-packages/discord/app_commands/tree.py", line 1240, in _call valorant-bot | await command._invoke_with_namespace(interaction, namespace) valorant-bot | File "/usr/local/lib/python3.10/dist-packages/discord/app_commands/commands.py", line 876, in _invoke_with_namespace valorant-bot | return await self._do_call(interaction, transformed_values) valorant-bot | File "/usr/local/lib/python3.10/dist-packages/discord/app_commands/commands.py", line 869, in _do_call valorant-bot | raise CommandInvokeError(self, e) from e valorant-bot | discord.app_commands.errors.CommandInvokeError: Command 'login' raised an exception: ContentTypeError: 0, message='Attempt to decode JSON with unexpected mimetype: text/html; charset=utf-8', url=URL('https://auth.riotgames.com/api/v1/authorization') valorant-bot | valorant-bot | During handling of the above exception, another exception occurred: valorant-bot | valorant-bot | Traceback (most recent call last): valorant-bot | File "/usr/local/lib/python3.10/dist-packages/discord/app_commands/tree.py", line 1089, in wrapper valorant-bot | await self._call(interaction) valorant-bot | File "/usr/local/lib/python3.10/dist-packages/discord/app_commands/tree.py", line 1244, in _call valorant-bot | await self.on_error(interaction, e) valorant-bot | File "/app/cogs/errors.py", line 65, in on_app_command_error valorant-bot | traceback.print_exception(type(error), error) valorant-bot | File "/usr/lib/python3.10/traceback.py", line 116, in print_exception valorant-bot | value, tb = _parse_value_tb(exc, value, tb) valorant-bot | File "/usr/lib/python3.10/traceback.py", line 95, in _parse_value_tb valorant-bot | raise ValueError("Both or neither of value and tb must be given") valorant-bot | ValueError: Both or neither of value and tb must be given valorant-bot | Unclosed client session valorant-bot | client_session: <utils.valorant.auth.ClientSession object at 0x7ff1c2cd9b10> valorant-bot | Unclosed connector valorant-bot | connections: ['[(<aiohttp.client_proto.ResponseHandler object at 0x7ff1c26fc880>, 811539.139892065)]'] valorant-bot | connector: <aiohttp.connector.TCPConnector object at 0x7ff1c2cd9300>

musnows commented 1 year ago

image