Задать вопрос
@L3gend

RuntimeError: Event loop is closed, что делать?

Здравствуйте. Сделал бота на питоне, но при запуске вылазить такая ошибка - RuntimeError: Event loop is closed.

Вот лог:
Traceback (most recent call last):
File "C:\Users\ARHITECT\Desktop\бот дс\discordbot.py", line 52, in
bot.run("NTU5NDE5MzIyMzk3NjIyMjc2.XJe11w.IW_pTvkskO9cesQiQIH8soVrF0w")
File "C:\Users\ARHITECT\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\client.py", line 723, in run
return future.result()
File "C:\Users\ARHITECT\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\client.py", line 702, in runner
await self.start(*args, **kwargs)
File "C:\Users\ARHITECT\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\client.py", line 666, in start
await self.connect(reconnect=reconnect)
File "C:\Users\ARHITECT\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\client.py", line 601, in connect
raise PrivilegedIntentsRequired(exc.shard_id) from None
discord.errors.PrivilegedIntentsRequired: Shard ID None is requesting privileged intents that have not been explicitly enabled in the developer portal. It is recommended to go to https://discord.com/developers/applications/ and explicitly enable the privileged intents within your application's page. If this is not possible, then consider disabling the privileged intents instead.
Exception ignored in:
Traceback (most recent call last):
File "C:\Users\ARHITECT\AppData\Local\Programs\Python\Python310\lib\asyncio\proactor_events.py", line 116, in __del__
self.close()
File "C:\Users\ARHITECT\AppData\Local\Programs\Python\Python310\lib\asyncio\proactor_events.py", line 108, in close
self._loop.call_soon(self._call_connection_lost, None)
File "C:\Users\ARHITECT\AppData\Local\Programs\Python\Python310\lib\asyncio\base_events.py", line 745, in call_soon
self._check_closed()
File "C:\Users\ARHITECT\AppData\Local\Programs\Python\Python310\lib\asyncio\base_events.py", line 510, in _check_closed
raise RuntimeError('Event loop is closed')
RuntimeError: Event loop is closed
  • Вопрос задан
  • 393 просмотра
Подписаться 1 Средний Комментировать
Решения вопроса 1
sergey-gornostaev
@sergey-gornostaev Куратор тега Python
Седой и строгий
Внимательно читать трейсбэк, в нём написана и причина ошибки и рецепт её исправления:

Shard ID None is requesting privileged intents that have not been explicitly enabled in the developer portal. It is recommended to go to https://discord.com/developers/applications/ and explicitly enable the privileged intents within your application's page. If this is not possible, then consider disabling the privileged intents instead.
Ответ написан
Пригласить эксперта
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Похожие вопросы
19 дек. 2024, в 02:11
15000 руб./за проект
19 дек. 2024, в 02:09
11000 руб./за проект
19 дек. 2024, в 00:46
30000 руб./за проект