Closed AlexaCarra closed 1 year ago
Please read the traceback
interactions.client.errors.LoginError: An improper token was passed
In your previous issue, you leaked your token, so GitHub reported it to Discord who promptly invalidated it. You would have received an email about this
Library Version
5.4.0
Describe the Bug
I run the code that worked on version 5.0.1 on the new version, and it throws me an error
Steps to Reproduce
-
Expected Results
-
Minimal Reproducible Code
Traceback
GET::https://discord.com/api/v10/users/@me: 401 Traceback (most recent call last): File "D:\Proggs\Python10\lib\site-packages\interactions\api\http\http_client.py", line 533, in login result = await self.request(Route("GET", "/users/@me")) File "D:\Proggs\Python10\lib\site-packages\interactions\api\http\http_client.py", line 450, in request await self._raise_exception(response, route, result) File "D:\Proggs\Python10\lib\site-packages\interactions\api\http\http_client.py", line 471, in _raise_exception raise HTTPException(response, response_data=result, route=route) interactions.client.errors.HTTPException: HTTPException: 401|Unauthorized || 401: Unauthorized
The above exception was the direct cause of the following exception:
Traceback (most recent call last): File "D:\Dev\python\SRC\DiscordWalletBot\MainBot.py", line 650, in
bot.start('MTA5NjEzMTQ2MDQ4Nzk3MDg1Nw.GCs6XD.MqtnaXgXhWhnXAI3xzMvmJdEUrX-D65JzrarT8')
File "D:\Proggs\Python10\lib\site-packages\interactions\client\client.py", line 977, in start
asyncio.run(self.astart(token))
File "D:\Proggs\Python10\lib\asyncio\runners.py", line 44, in run
return loop.run_until_complete(main)
File "D:\Proggs\Python10\lib\asyncio\base_events.py", line 646, in run_until_complete
return future.result()
File "D:\Proggs\Python10\lib\site-packages\interactions\client\client.py", line 933, in astart
await self.login(token)
File "D:\Proggs\Python10\lib\site-packages\interactions\client\client.py", line 915, in login
me = await self.http.login(self.token)
File "D:\Proggs\Python10\lib\site-packages\interactions\api\http\http_client.py", line 537, in login
raise LoginError("An improper token was passed") from e
interactions.client.errors.LoginError: An improper token was passed
Unclosed client session
client_session: <aiohttp.client.ClientSession object at 0x0000024F69D99C30>
Unclosed connector
connections: ['[(<aiohttp.client_proto.ResponseHandler object at 0x0000024F69DB4B20>, 384162.046)]', '[(<aiohttp.client_proto.ResponseHandler object at 0x0000024F69DB4F40>, 384162.312)]']
connector: <aiohttp.connector.TCPConnector object at 0x0000024F69D98D00>
Exception ignored in: <function _ProactorBasePipeTransport.del at 0x0000024F67B049D0>
Traceback (most recent call last):
File "D:\Proggs\Python10\lib\asyncio\proactor_events.py", line 116, in del
File "D:\Proggs\Python10\lib\asyncio\proactor_events.py", line 108, in close
File "D:\Proggs\Python10\lib\asyncio\base_events.py", line 750, in call_soon
File "D:\Proggs\Python10\lib\asyncio\base_events.py", line 515, in _check_closed
RuntimeError: Event loop is closed
Fatal error on SSL transport
protocol: <asyncio.sslproto.SSLProtocol object at 0x0000024F69DE46A0>
transport: <_ProactorSocketTransport fd=624 read=<_OverlappedFuture cancelled>>
Traceback (most recent call last):
File "D:\Proggs\Python10\lib\asyncio\sslproto.py", line 690, in _process_write_backlog
self._transport.write(chunk)
File "D:\Proggs\Python10\lib\asyncio\proactor_events.py", line 361, in write
self._loop_writing(data=bytes(data))
File "D:\Proggs\Python10\lib\asyncio\proactor_events.py", line 397, in _loop_writing
self._write_fut = self._loop._proactor.send(self._sock, data)
AttributeError: 'NoneType' object has no attribute 'send'
Exception ignored in: <function _SSLProtocolTransport.del at 0x0000024F67651990>
Traceback (most recent call last):
File "D:\Proggs\Python10\lib\asyncio\sslproto.py", line 321, in del
File "D:\Proggs\Python10\lib\asyncio\sslproto.py", line 316, in close
File "D:\Proggs\Python10\lib\asyncio\sslproto.py", line 599, in _start_shutdown
File "D:\Proggs\Python10\lib\asyncio\sslproto.py", line 604, in _write_appdata
File "D:\Proggs\Python10\lib\asyncio\sslproto.py", line 712, in _process_write_backlog
File "D:\Proggs\Python10\lib\asyncio\sslproto.py", line 726, in _fatal_error
File "D:\Proggs\Python10\lib\asyncio\proactor_events.py", line 151, in _force_close
File "D:\Proggs\Python10\lib\asyncio\base_events.py", line 750, in call_soon
File "D:\Proggs\Python10\lib\asyncio\base_events.py", line 515, in _check_closed
RuntimeError: Event loop is closed
Process finished with exit code 1
Checklist
Additional Information
No response