Closed arfathyahiya closed 2 years ago
UPDATE:
self.loop = asyncio.WindowsSelectorEventLoopPolicy().get_event_loop()
super().__init__(command_prefix=self.PREFIX, strip_after_prefix=True, case_insensitive=True, loop=self.loop)
This worked for me but now,
When trying to await self.wait_until_ready()
I get the following error
Traceback (most recent call last):
File "C:\Users\arfatha\.virtualenvs\Discord Bot Mehmat\lib\site-packages\discord\client.py", line 301, in _run_event
await coro(*args, **kwargs)
File "D:\Upwork\Corey Lawson\lib\bot\__init__.py", line 34, in on_connect
await self.wait_until_ready()
File "C:\Users\arfatha\.virtualenvs\Discord Bot Mehmat\lib\site-packages\discord\client.py", line 790, in wait_until_ready
await self._ready.wait()
File "C:\Users\arfatha\AppData\Local\Programs\Python\Python38\lib\asyncio\locks.py", line 309, in wait
await fut
RuntimeError: Task <ClientEventTask state=pending event=on_connect coro=<bound method Bot.on_connect of <lib.bot.Bot object at 0x000001E410523790>>> got Future <Future pending> attached to a different loop
Try updating to python 3.9.
This has gone stale and isn't something I can resolve in the library. Closing.
Summary
await bot.close() returns Runtime error
Reproduction Steps
just logging out of the bot on windows platform
Code
Expected Results
Exit the event loop quietly without any errors
Actual Results
System Information
Checklist
Additional Information
I also tried this solution but got the following error