hollowstrawberry / crab-cogs

Red Discord bot cogs for the Crab friend group
GNU General Public License v3.0
16 stars 3 forks source link

[simulator] sqlite3.OperationalError: database is locked` #23

Closed DJTOMATO closed 1 year ago

DJTOMATO commented 1 year ago

While doing simulator feed

apparently the process still finishes and works, but saw this error, just in case

 Traceback (most recent call last):
   File "/home/glas/redenv/lib/python3.11/site-packages/discord/client.py", line 441, in _run_event
     await coro(*args, **kwargs)
   File "/mnt/hdd/data/lenabot/cogs/CogManager/cogs/simulator/simulator.py", line 377, in on_message
     await self.insert_message_db(message, db)
   File "/mnt/hdd/data/lenabot/cogs/CogManager/cogs/simulator/simulator.py", line 586, in insert_message_db
     await db.execute(f'INSERT INTO {DB_TABLE_MESSAGES} VALUES (?, ?, ?)',
   File "/home/glas/redenv/lib/python3.11/site-packages/aiosqlite/core.py", line 190, in execute
     cursor = await self._execute(self._conn.execute, sql, parameters)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   File "/home/glas/redenv/lib/python3.11/site-packages/aiosqlite/core.py", line 133, in _execute
     return await future
            ^^^^^^^^^^^^
   File "/home/glas/redenv/lib/python3.11/site-packages/aiosqlite/core.py", line 106, in run
     result = function()
              ^^^^^^^^^^
 sqlite3.OperationalError: database is locked
hollowstrawberry commented 1 year ago

Ah, I think this is expected, but I'll keep it in mind. Thanks.