Open rashidsaud506 opened 1 year ago
Windows:
https://auth.riotgames.com/api/v1/authorization
)Hi im using docker and i got similar error Can you show me how to solve this?
Thanks in advance!
2023-08-23 01:31:44 Task exception was never retrieved 2023-08-23 01:31:44 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')> 2023-08-23 01:31:44 Traceback (most recent call last): 2023-08-23 01:31:44 File "/usr/local/lib/python3.10/dist-packages/discord/app_commands/commands.py", line 850, in _do_call 2023-08-23 01:31:44 return await self._callback(self.binding, interaction, **params) # type: ignore 2023-08-23 01:31:44 File "/app/cogs/valorant.py", line 93, in login 2023-08-23 01:31:44 authenticate = await auth.authenticate(username, password) 2023-08-23 01:31:44 File "/app/utils/valorant/auth.py", line 122, in authenticate 2023-08-23 01:31:44 data = await r.json() 2023-08-23 01:31:44 File "/usr/local/lib/python3.10/dist-packages/aiohttp/client_reqrep.py", line 1104, in json 2023-08-23 01:31:44 raise ContentTypeError( 2023-08-23 01:31:44 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') 2023-08-23 01:31:44 2023-08-23 01:31:44 The above exception was the direct cause of the following exception: 2023-08-23 01:31:44 2023-08-23 01:31:44 Traceback (most recent call last): 2023-08-23 01:31:44 File "/usr/local/lib/python3.10/dist-packages/discord/app_commands/tree.py", line 1240, in _call 2023-08-23 01:31:44 await command._invoke_with_namespace(interaction, namespace) 2023-08-23 01:31:44 File "/usr/local/lib/python3.10/dist-packages/discord/app_commands/commands.py", line 876, in _invoke_with_namespace 2023-08-23 01:31:44 return await self._do_call(interaction, transformed_values) 2023-08-23 01:31:44 File "/usr/local/lib/python3.10/dist-packages/discord/app_commands/commands.py", line 869, in _do_call 2023-08-23 01:31:44 raise CommandInvokeError(self, e) from e 2023-08-23 01:31:44 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') 2023-08-23 01:31:44 2023-08-23 01:31:44 During handling of the above exception, another exception occurred: 2023-08-23 01:31:44 2023-08-23 01:31:44 Traceback (most recent call last): 2023-08-23 01:31:44 File "/usr/local/lib/python3.10/dist-packages/discord/app_commands/tree.py", line 1089, in wrapper 2023-08-23 01:31:44 await self._call(interaction) 2023-08-23 01:31:44 File "/usr/local/lib/python3.10/dist-packages/discord/app_commands/tree.py", line 1244, in _call 2023-08-23 01:31:44 await self.on_error(interaction, e) 2023-08-23 01:31:44 File "/app/cogs/errors.py", line 65, in on_app_command_error 2023-08-23 01:31:44 traceback.print_exception(type(error), error) 2023-08-23 01:31:44 File "/usr/lib/python3.10/traceback.py", line 116, in print_exception 2023-08-23 01:31:44 value, tb = _parse_value_tb(exc, value, tb) 2023-08-23 01:31:44 File "/usr/lib/python3.10/traceback.py", line 95, in _parse_value_tb 2023-08-23 01:31:44 raise ValueError("Both or neither of value and tb must be given") 2023-08-23 01:31:44 ValueError: Both or neither of value and tb must be given 2023-08-23 01:31:44 Unclosed client session 2023-08-23 01:31:44 client_session: <utils.valorant.auth.ClientSession object at 0x7f1c81f683a0> 2023-08-23 01:31:44 Unclosed connector 2023-08-23 01:31:44 connections: ['[(<aiohttp.client_proto.ResponseHandler object at 0x7f1c81624400>, 9056.978552112)]'] 2023-08-23 01:31:44 connector: <aiohttp.connector.TCPConnector object at 0x7f1c81603b80>
Version: 3.3.5 Task exception was never retrieved future: <Task finished name='CommandTree-invoker' coro=<CommandTree._from_interaction..wrapper() done, defined at C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-packages\discord\app_commands\tree.py:1087> exception=ValueError('Both or neither of value and tb must be given')>
Traceback (most recent call last):
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-packages\aiohttp\connector.py", line 980, in _wrap_create_connection
return await self._loop.create_connection(*args, **kwargs) # type: ignore[return-value] # noqa
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\asyncio\base_events.py", line 1112, in create_connection
transport, protocol = await self._create_connection_transport(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\asyncio\base_events.py", line 1145, in _create_connection_transport
await waiter
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\asyncio\sslproto.py", line 574, in _on_handshake_complete
raise handshake_exc
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\asyncio\sslproto.py", line 556, in _do_handshake
self._sslobj.do_handshake()
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\ssl.py", line 979, in do_handshake
self._sslobj.do_handshake()
ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1002)
The above exception was the direct cause of the following exception:
Traceback (most recent call last): File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-packages\discord\app_commands\commands.py", line 850, in _do_call return await self._callback(self.binding, interaction, **params) # type: ignore ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Administrator\Desktop\Valorant-DiscordBot\cogs\valorant.py", line 93, in login authenticate = await auth.authenticate(username, password) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Administrator\Desktop\Valorant-DiscordBot\utils\valorant\auth.py", line 112, in authenticate r = await session.post('https://auth.riotgames.com/api/v1/authorization', json=data, headers=self._headers) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-packages\aiohttp\client.py", line 536, in _request conn = await self._connector.connect( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-packages\aiohttp\connector.py", line 540, in connect proto = await self._create_connection(req, traces, timeout) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-packages\aiohttp\connector.py", line 901, in _createconnection , proto = await self._create_direct_connection(req, traces, timeout) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-packages\aiohttp\connector.py", line 1206, in _create_direct_connection raise last_exc File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-packages\aiohttp\connector.py", line 1175, in _create_direct_connection transp, proto = await self._wrap_create_connection( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-packages\aiohttp\connector.py", line 982, in _wrap_create_connection raise ClientConnectorCertificateError(req.connection_key, exc) from exc aiohttp.client_exceptions.ClientConnectorCertificateError: Cannot connect to host auth.riotgames.com:443 ssl:True [SSLCertVerificationError: (1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1002)')]
The above exception was the direct cause of the following exception:
Traceback (most recent call last): File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-packages\discord\app_commands\tree.py", line 1240, in _call await command._invoke_with_namespace(interaction, namespace) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-packages\discord\app_commands\commands.py", line 876, in _invoke_with_namespace return await self._do_call(interaction, transformed_values) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-packages\discord\app_commands\commands.py", line 869, in _do_call raise CommandInvokeError(self, e) from e discord.app_commands.errors.CommandInvokeError: Command 'login' raised an exception: ClientConnectorCertificateError: Cannot connect to host auth.riotgames.com:443 ssl:True [SSLCertVerificationError: (1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1002)')]
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-packages\discord\app_commands\tree.py", line 1089, in wrapper await self._call(interaction) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-packages\discord\app_commands\tree.py", line 1244, in _call await self.on_error(interaction, e) File "C:\Users\Administrator\Desktop\Valorant-DiscordBot\cogs\errors.py", line 65, in on_app_command_error traceback.print_exception(type(error), error) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\traceback.py", line 123, in print_exception value, tb = _parse_value_tb(exc, value, tb) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\traceback.py", line 98, in _parse_value_tb raise ValueError("Both or neither of value and tb must be given") ValueError: Both or neither of value and tb must be given