this error:
Traceback (most recent call last):
File "K:\coding\Other\notificationBot\sb.py", line 117, in
bot.run(token=token)
File "K:\coding\Other\notificationBot\venv\lib\site-packages\discord\client.py", line 938, in run
asyncio.run(runner())
File "C:\Users\salma\AppData\Local\Programs\Python\Python39\lib\asyncio\runners.py", line 44, in run
return loop.run_until_complete(main)
File "C:\Users\salma\AppData\Local\Programs\Python\Python39\lib\asyncio\base_events.py", line 647, in run_until_complete
return future.result()
File "K:\coding\Other\notificationBot\venv\lib\site-packages\discord\client.py", line 927, in runner
await self.start(token, reconnect=reconnect)
File "K:\coding\Other\notificationBot\venv\lib\site-packages\discord\client.py", line 857, in start
await self.login(token)
File "K:\coding\Other\notificationBot\venv\lib\site-packages\discord\client.py", line 698, in login
data = await state.http.static_login(token.strip())
File "K:\coding\Other\notificationBot\venv\lib\site-packages\discord\http.py", line 991, in static_login
await self.startup()
File "K:\coding\Other\notificationBot\venv\lib\site-packages\discord\http.py", line 562, in startup
self.super_properties, self.encoded_superproperties = sp, = await utils._get_info(session)
File "K:\coding\Other\notificationBot\venv\lib\site-packages\discord\utils.py", line 1446, in _get_info
bn = await _get_build_number(session)
File "K:\coding\Other\notificationBot\venv\lib\site-packages\discord\utils.py", line 1474, in _get_build_number
build_url = 'https://discord.com/assets/' + re.compile(r'assets/+([a-z0-9]+).js').findall(login_page)[-2] + '.js'
IndexError: list index out of range
Exception ignored in: <function _ProactorBasePipeTransport.del at 0x000001FF7C6C38B0>
Traceback (most recent call last):
File "C:\Users\salma\AppData\Local\Programs\Python\Python39\lib\asyncio\proactor_events.py", line 116, in del
self.close()
File "C:\Users\salma\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\salma\AppData\Local\Programs\Python\Python39\lib\asyncio\base_events.py", line 751, in call_soon
self._check_closed()
File "C:\Users\salma\AppData\Local\Programs\Python\Python39\lib\asyncio\base_events.py", line 515, in _check_closed
raise RuntimeError('Event loop is closed')
RuntimeError: Event loop is closed
Exception ignored in: <function _ProactorBasePipeTransport.del at 0x000001FF7C6C38B0>
Traceback (most recent call last):
File "C:\Users\salma\AppData\Local\Programs\Python\Python39\lib\asyncio\proactor_events.py", line 116, in del
self.close()
File "C:\Users\salma\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\salma\AppData\Local\Programs\Python\Python39\lib\asyncio\base_events.py", line 751, in call_soon
self._check_closed()
File "C:\Users\salma\AppData\Local\Programs\Python\Python39\lib\asyncio\base_events.py", line 515, in _check_closed
raise RuntimeError('Event loop is closed')
RuntimeError: Event loop is closed
Exception ignored in: <function _ProactorBasePipeTransport.del at 0x000001FF7C6C38B0>
Traceback (most recent call last):
File "C:\Users\salma\AppData\Local\Programs\Python\Python39\lib\asyncio\proactor_events.py", line 116, in del
self.close()
File "C:\Users\salma\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\salma\AppData\Local\Programs\Python\Python39\lib\asyncio\base_events.py", line 751, in call_soon
self._check_closed()
File "C:\Users\salma\AppData\Local\Programs\Python\Python39\lib\asyncio\base_events.py", line 515, in _check_closed
raise RuntimeError('Event loop is closed')
RuntimeError: Event loop is closed
Exception ignored in: <function _ProactorBasePipeTransport.del at 0x000001FF7C6C38B0>
Traceback (most recent call last):
File "C:\Users\salma\AppData\Local\Programs\Python\Python39\lib\asyncio\proactor_events.py", line 116, in del
self.close()
File "C:\Users\salma\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\salma\AppData\Local\Programs\Python\Python39\lib\asyncio\base_events.py", line 751, in call_soon
self._check_closed()
File "C:\Users\salma\AppData\Local\Programs\Python\Python39\lib\asyncio\base_events.py", line 515, in _check_closed
raise RuntimeError('Event loop is closed')
RuntimeError: Event loop is closed
Exception ignored in: <function _ProactorBasePipeTransport.del at 0x000001FF7C6C38B0>
Traceback (most recent call last):
File "C:\Users\salma\AppData\Local\Programs\Python\Python39\lib\asyncio\proactor_events.py", line 116, in del
self.close()
File "C:\Users\salma\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\salma\AppData\Local\Programs\Python\Python39\lib\asyncio\base_events.py", line 751, in call_soon
self._check_closed()
File "C:\Users\salma\AppData\Local\Programs\Python\Python39\lib\asyncio\base_events.py", line 515, in _check_closed
raise RuntimeError('Event loop is closed')
RuntimeError: Event loop is closed
System Information
- Python v3.9.13-final
- discord.py-self v2.0.0-final
- aiohttp v3.9.1
- system info: Windows 10 10.0.19045
Checklist
[X] I have searched the open issues for duplicates.
[X] I have shared the entire traceback.
[X] I am using a user token (and it isn't visible in the code).
Summary
Event Loop Is Closed prevents starting bot.
Reproduction Steps
Use the current version Start your bot
Code
Expected Results
The bot starts up
Actual Results
this error: Traceback (most recent call last): File "K:\coding\Other\notificationBot\sb.py", line 117, in
bot.run(token=token)
File "K:\coding\Other\notificationBot\venv\lib\site-packages\discord\client.py", line 938, in run
asyncio.run(runner())
File "C:\Users\salma\AppData\Local\Programs\Python\Python39\lib\asyncio\runners.py", line 44, in run
return loop.run_until_complete(main)
File "C:\Users\salma\AppData\Local\Programs\Python\Python39\lib\asyncio\base_events.py", line 647, in run_until_complete
return future.result()
File "K:\coding\Other\notificationBot\venv\lib\site-packages\discord\client.py", line 927, in runner
await self.start(token, reconnect=reconnect)
File "K:\coding\Other\notificationBot\venv\lib\site-packages\discord\client.py", line 857, in start
await self.login(token)
File "K:\coding\Other\notificationBot\venv\lib\site-packages\discord\client.py", line 698, in login
data = await state.http.static_login(token.strip())
File "K:\coding\Other\notificationBot\venv\lib\site-packages\discord\http.py", line 991, in static_login
await self.startup()
File "K:\coding\Other\notificationBot\venv\lib\site-packages\discord\http.py", line 562, in startup
self.super_properties, self.encoded_superproperties = sp, = await utils._get_info(session)
File "K:\coding\Other\notificationBot\venv\lib\site-packages\discord\utils.py", line 1446, in _get_info
bn = await _get_build_number(session)
File "K:\coding\Other\notificationBot\venv\lib\site-packages\discord\utils.py", line 1474, in _get_build_number
build_url = 'https://discord.com/assets/' + re.compile(r'assets/+([a-z0-9]+).js').findall(login_page)[-2] + '.js'
IndexError: list index out of range
Exception ignored in: <function _ProactorBasePipeTransport.del at 0x000001FF7C6C38B0>
Traceback (most recent call last):
File "C:\Users\salma\AppData\Local\Programs\Python\Python39\lib\asyncio\proactor_events.py", line 116, in del
self.close()
File "C:\Users\salma\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\salma\AppData\Local\Programs\Python\Python39\lib\asyncio\base_events.py", line 751, in call_soon
self._check_closed()
File "C:\Users\salma\AppData\Local\Programs\Python\Python39\lib\asyncio\base_events.py", line 515, in _check_closed
raise RuntimeError('Event loop is closed')
RuntimeError: Event loop is closed
Exception ignored in: <function _ProactorBasePipeTransport.del at 0x000001FF7C6C38B0>
Traceback (most recent call last):
File "C:\Users\salma\AppData\Local\Programs\Python\Python39\lib\asyncio\proactor_events.py", line 116, in del
self.close()
File "C:\Users\salma\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\salma\AppData\Local\Programs\Python\Python39\lib\asyncio\base_events.py", line 751, in call_soon
self._check_closed()
File "C:\Users\salma\AppData\Local\Programs\Python\Python39\lib\asyncio\base_events.py", line 515, in _check_closed
raise RuntimeError('Event loop is closed')
RuntimeError: Event loop is closed
Exception ignored in: <function _ProactorBasePipeTransport.del at 0x000001FF7C6C38B0>
Traceback (most recent call last):
File "C:\Users\salma\AppData\Local\Programs\Python\Python39\lib\asyncio\proactor_events.py", line 116, in del
self.close()
File "C:\Users\salma\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\salma\AppData\Local\Programs\Python\Python39\lib\asyncio\base_events.py", line 751, in call_soon
self._check_closed()
File "C:\Users\salma\AppData\Local\Programs\Python\Python39\lib\asyncio\base_events.py", line 515, in _check_closed
raise RuntimeError('Event loop is closed')
RuntimeError: Event loop is closed
Exception ignored in: <function _ProactorBasePipeTransport.del at 0x000001FF7C6C38B0>
Traceback (most recent call last):
File "C:\Users\salma\AppData\Local\Programs\Python\Python39\lib\asyncio\proactor_events.py", line 116, in del
self.close()
File "C:\Users\salma\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\salma\AppData\Local\Programs\Python\Python39\lib\asyncio\base_events.py", line 751, in call_soon
self._check_closed()
File "C:\Users\salma\AppData\Local\Programs\Python\Python39\lib\asyncio\base_events.py", line 515, in _check_closed
raise RuntimeError('Event loop is closed')
RuntimeError: Event loop is closed
Exception ignored in: <function _ProactorBasePipeTransport.del at 0x000001FF7C6C38B0>
Traceback (most recent call last):
File "C:\Users\salma\AppData\Local\Programs\Python\Python39\lib\asyncio\proactor_events.py", line 116, in del
self.close()
File "C:\Users\salma\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\salma\AppData\Local\Programs\Python\Python39\lib\asyncio\base_events.py", line 751, in call_soon
self._check_closed()
File "C:\Users\salma\AppData\Local\Programs\Python\Python39\lib\asyncio\base_events.py", line 515, in _check_closed
raise RuntimeError('Event loop is closed')
RuntimeError: Event loop is closed
System Information
- Python v3.9.13-final
- discord.py-self v2.0.0-final
- aiohttp v3.9.1
- system info: Windows 10 10.0.19045
Checklist
Additional Information
No response