@Foxik1

Ошибка «Self RuntimeError: Event loop is closed», что делать?

Ошибки
File "joke.py", line 10, in <module>
    client.run(token)
  File "C:\Users\1\AppData\Local\Programs\Python\Python38\lib\site-packages\discord\client.py", line 631, in run
    return future.result()
  File "C:\Users\1\AppData\Local\Programs\Python\Python38\lib\site-packages\discord\client.py", line 610, in runner
    await self.start(*args, **kwargs)
  File "C:\Users\1\AppData\Local\Programs\Python\Python38\lib\site-packages\discord\client.py", line 573, in start
    await self.login(*args)
  File "C:\Users\1\AppData\Local\Programs\Python\Python38\lib\site-packages\discord\client.py", line 424, in login
    await self.http.static_login(token.strip())
  File "C:\Users\1\AppData\Local\Programs\Python\Python38\lib\site-packages\discord\http.py", line 353, in static_login
    raise LoginFailure('Improper token has been passed.') from exc
discord.errors.LoginFailure: Improper token has been passed.
Exception ignored in: <function _ProactorBasePipeTransport.__del__ at 0x000001ADFE34FDC0>
Traceback (most recent call last):
  File "C:\Users\1\AppData\Local\Programs\Python\Python38\lib\asyncio\proactor_events.py", line 116, in __del__
    self.close()
  File "C:\Users\1\AppData\Local\Programs\Python\Python38\lib\asyncio\proactor_events.py", line 108, in close
    self._loop.call_soon(self._call_connection_lost, None)
  File "C:\Users\1\AppData\Local\Programs\Python\Python38\lib\asyncio\base_events.py", line 711, in call_soon
    self._check_closed()
  File "C:\Users\1\AppData\Local\Programs\Python\Python38\lib\asyncio\base_events.py", line 504, in _check_closed
    raise RuntimeError('Event loop is closed')
RuntimeError: Event loop is closed
Exception ignored in: <function _ProactorBasePipeTransport.__del__ at 0x000001ADFE34FDC0>
Traceback (most recent call last):
  File "C:\Users\1\AppData\Local\Programs\Python\Python38\lib\asyncio\proactor_events.py", line 116, in __del__
    self.close()
  File "C:\Users\1\AppData\Local\Programs\Python\Python38\lib\asyncio\proactor_events.py", line 108, in close
    self._loop.call_soon(self._call_connection_lost, None)
  File "C:\Users\1\AppData\Local\Programs\Python\Python38\lib\asyncio\base_events.py", line 711, in call_soon
    self._check_closed()
  File "C:\Users\1\AppData\Local\Programs\Python\Python38\lib\asyncio\base_events.py", line 504, in _check_closed
    raise RuntimeError('Event loop is closed')
RuntimeError: Event loop is closed
Exception ignored in: <function _ProactorBasePipeTransport.__del__ at 0x000001ADFE34FDC0>
Traceback (most recent call last):
  File "C:\Users\1\AppData\Local\Programs\Python\Python38\lib\asyncio\proactor_events.py", line 116, in __del__
    self.close()
  File "C:\Users\1\AppData\Local\Programs\Python\Python38\lib\asyncio\proactor_events.py", line 108, in close
    self._loop.call_soon(self._call_connection_lost, None)
  File "C:\Users\1\AppData\Local\Programs\Python\Python38\lib\asyncio\base_events.py", line 711, in call_soon
    self._check_closed()
  File "C:\Users\1\AppData\Local\Programs\Python\Python38\lib\asyncio\base_events.py", line 504, in _check_closed
    raise RuntimeError('Event loop is closed')
RuntimeError: Event loop is closed


Код
import discord
from discord.ext import commands

client = commands.Bot(command_prefix = '.', self_bot = True)

@client.command()
async def ban(ctx):
	await ctx.send(pong)

client.run(token)
  • Вопрос задан
  • 359 просмотров
Решения вопроса 1
SoreMix
@SoreMix
yellow
Improper token has been passed


Какой-то токен не тот передали
Ответ написан
Пригласить эксперта
Ваш ответ на вопрос

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

Войти через центр авторизации
Похожие вопросы