|
When I was checking log of this bot I've noticed that thing in gc loop
Traceback (most recent call last):
File "/var/lib/ptc/venv/lib/python3.10/site-packages/discord/client.py", line 449, in _run_event
await coro(*args, **kwargs)
File "/var/lib/ptc/venv/lib/python3.10/site-packages/petthecord/runner.py", line 57, in on_ready
await petter.gc_loop()
File "/var/lib/ptc/venv/lib/python3.10/site-packages/petthecord/cache.py", line 107, in gc_loop
del self._cache[filename.split('_')[0]]
KeyError: '...'
I don't really want to know why this error has occured, but IMO it's
something related to broken index.json. So to fix the bug I just wrapped
deleting action to try-except block which will ignore the KeyError
exception. TBH looks like a kludge, but as I said I don't want to get
into it :>
|