dolfies / discord.py-self

A fork of the popular discord.py for user accounts.
https://discordpy-self.rtfd.io/en/latest/
MIT License
651 stars 154 forks source link

Bot is not starting #572

Closed knockstick closed 10 months ago

knockstick commented 10 months ago

Summary

bot.run(token) returns an error

Reproduction Steps

d

Code

import discord
from discord.ext import commands

bot = commands.Bot(command_prefix="!", help_command=None)

@bot.event
async def on_ready():
    print(bot.user)

bot.run("Token")

Expected Results

Run the bot.

Actual Results

2023-09-08 20:54:46 INFO discord.client Logging in using static token. 2023-09-08 20:54:46 WARNING discord.utils Info API down. Falling back to manual fetching... Traceback (most recent call last): File "file.py", line 18, in bot.run("token") File "C:\Users\thema\AppData\Local\Programs\Python\Python39\lib\site-packages\discord\client.py", line 938, in run asyncio.run(runner()) File "C:\Users\thema\AppData\Local\Programs\Python\Python39\lib\asyncio\runners.py", line 44, in run return loop.run_until_complete(main) File "C:\Users\thema\AppData\Local\Programs\Python\Python39\lib\asyncio\base_events.py", line 642, in run_until_complete return future.result() File "C:\Users\thema\AppData\Local\Programs\Python\Python39\lib\site-packages\discord\client.py", line 927, in runner await self.start(token, reconnect=reconnect) File "C:\Users\thema\AppData\Local\Programs\Python\Python39\lib\site-packages\discord\client.py", line 857, in start await self.login(token) File "C:\Users\thema\AppData\Local\Programs\Python\Python39\lib\site-packages\discord\client.py", line 698, in login data = await state.http.static_login(token.strip()) File "C:\Users\thema\AppData\Local\Programs\Python\Python39\lib\site-packages\discord\http.py", line 991, in static_login await self.startup() File "C:\Users\thema\AppData\Local\Programs\Python\Python39\lib\site-packages\discord\http.py", line 562, in startup self.super_properties, self.encoded_superproperties = sp, = await utils._get_info(session) File "C:\Users\thema\AppData\Local\Programs\Python\Python39\lib\site-packages\discord\utils.py", line 1446, in _get_info bn = await _get_build_number(session) File "C:\Users\thema\AppData\Local\Programs\Python\Python39\lib\site-packages\discord\utils.py", line 1473, in _get_build_number login_page = await login_page_request.text() File "C:\Users\thema\AppData\Local\Programs\Python\Python39\lib\site-packages\aiohttp\client_reqrep.py", line 1076, in text await self.read() File "C:\Users\thema\AppData\Local\Programs\Python\Python39\lib\site-packages\aiohttp\client_reqrep.py", line 1032, in read self._body = await self.content.read() File "C:\Users\thema\AppData\Local\Programs\Python\Python39\lib\site-packages\aiohttp\streams.py", line 344, in read raise self._exception aiohttp.client_exceptions.ClientPayloadError: 400, message='Can not decode content-encoding: br' Exception ignored in: <function _ProactorBasePipeTransport.del at 0x0000024167054E50> Traceback (most recent call last): File "C:\Users\thema\AppData\Local\Programs\Python\Python39\lib\asyncio\proactor_events.py", line 116, in del self.close() File "C:\Users\thema\AppData\Local\Programs\Python\Python39\lib\asyncio\proactor_events.py", line 108, in close self._loop.call_soon(self._call_connection_lost, None) File "C:\Users\thema\AppData\Local\Programs\Python\Python39\lib\asyncio\base_events.py", line 746, in call_soon self._check_closed() File "C:\Users\thema\AppData\Local\Programs\Python\Python39\lib\asyncio\base_events.py", line 510, in _check_closed raise RuntimeError('Event loop is closed') RuntimeError: Event loop is closed Exception ignored in: <function _ProactorBasePipeTransport.del at 0x0000024167054E50> Traceback (most recent call last): File "C:\Users\thema\AppData\Local\Programs\Python\Python39\lib\asyncio\proactor_events.py", line 116, in del self.close() File "C:\Users\thema\AppData\Local\Programs\Python\Python39\lib\asyncio\proactor_events.py", line 108, in close self._loop.call_soon(self._call_connection_lost, None) File "C:\Users\thema\AppData\Local\Programs\Python\Python39\lib\asyncio\base_events.py", line 746, in call_soon self._check_closed() File "C:\Users\thema\AppData\Local\Programs\Python\Python39\lib\asyncio\base_events.py", line 510, in _check_closed raise RuntimeError('Event loop is closed') RuntimeError: Event loop is closed

System Information

Checklist

Additional Information

none

Catchii69 commented 10 months ago

same bug

ghost commented 10 months ago

me too

dolfies commented 10 months ago

This issue has been mentioned numerous times before. Install brotli or update aiohttp.

ghost commented 10 months ago

i cant update aiohttp.

dolfies commented 10 months ago

Install brotli then.

ghost commented 10 months ago

kk