The full error:
Ignoring exception in on_application_command_error
Traceback (most recent call last):
File "C:\Python310\lib\site-packages\discord\client.py", line 707, in run
loop.run_forever()
File "C:\Python310\lib\asyncio\windows_events.py", line 319, in run_forever
assert self._self_reading_future is None
AssertionError
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Python310\lib\site-packages\discord\client.py", line 108, in _cleanup_loop
_cancel_tasks(loop)
File "C:\Python310\lib\site-packages\discord\client.py", line 90, in _cancel_tasks
loop.run_until_complete(asyncio.gather(*tasks, return_exceptions=True))
File "C:\Python310\lib\asyncio\base_events.py", line 622, in run_until_complete
self._check_running()
File "C:\Python310\lib\asyncio\base_events.py", line 582, in _check_running
raise RuntimeError('This event loop is already running')
RuntimeError: This event loop is already running
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Python310\lib\site-packages\discord\commands\core.py", line 124, in wrapped
ret = await coro(arg)
File "C:\Python310\lib\site-packages\discord\commands\core.py", line 974, in _invoke
await self.callback(ctx, **kwargs)
File "c:\Users\matth\Desktop\Viper\statbot.py", line 93, in rank
storeLog("rank", rank)
File "c:\Users\matth\Desktop\Viper\sqlserverthing.py", line 35, in storeLog
from statbot import target, author, timedate, error
File "c:\Users\matth\Desktop\Viper\statbot.py", line 119, in <module>
bot.run('token censored')
File "C:\Python310\lib\site-packages\discord\client.py", line 713, in run
_cleanup_loop(loop)
File "C:\Python310\lib\site-packages\discord\client.py", line 112, in _cleanup_loop
loop.close()
File "C:\Python310\lib\asyncio\proactor_events.py", line 677, in close
raise RuntimeError("Cannot close a running event loop")
RuntimeError: Cannot close a running event loop
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "C:\Python310\lib\site-packages\discord\client.py", line 377, in _run_event
await coro(*args, **kwargs)
File "c:\Users\matth\Desktop\Viper\statbot.py", line 116, in on_application_command_error
raise error
File "C:\Python310\lib\site-packages\discord\bot.py", line 1088, in invoke_application_command
await ctx.command.invoke(ctx)
File "C:\Python310\lib\site-packages\discord\commands\core.py", line 374, in invoke
await injected(ctx)
File "C:\Python310\lib\site-packages\discord\commands\core.py", line 132, in wrapped
raise ApplicationCommandInvokeError(exc) from exc
discord.errors.ApplicationCommandInvokeError: Application Command raised an exception: RuntimeError: Cannot close a running event loop
Exception ignored in: <function _ProactorBasePipeTransport.del at 0x0000025997B12560>
Traceback (most recent call last):
File "C:\Python310\lib\asyncio\proactor_events.py", line 116, in del
self.close()
File "C:\Python310\lib\asyncio\proactor_events.py", line 108, in close
self._loop.call_soon(self._call_connection_lost, None)
File "C:\Python310\lib\asyncio\base_events.py", line 750, in call_soon
self._check_closed()
File "C:\Python310\lib\asyncio\base_events.py", line 515, in _check_closed
raise RuntimeError('Event loop is closed')
RuntimeError: Event loop is closed