Ankihub error when adding multiple decks at the same time

Before the error happened, I was…
Syncing new decks I had subscribed to.

Error message (don't change this)
Anki 23.12.1 (1a1d4d54)  (ao)
Python 3.9.15 Qt 6.6.1 PyQt 6.6.1
Platform: Windows-10-10.0.26058

Traceback (most recent call last):

  File "D:\Users\rcabezas\AnkiData\addons21\1322529746\lib\peewee.py", line 3291, in execute_sql
    cursor.execute(sql, params or ())

sqlite3.OperationalError: database is locked


During handling of the above exception, another exception occurred:


Traceback (most recent call last):

  File "D:\Users\rcabezas\AnkiData\addons21\1322529746\gui\operations\deck_installation.py", line 123, in _download_and_install_decks_inner
    result.append(_download_and_install_single_deck(ah_did))

  File "D:\Users\rcabezas\AnkiData\addons21\1322529746\gui\operations\deck_installation.py", line 155, in _download_and_install_single_deck
    result = _install_deck(

  File "D:\Users\rcabezas\AnkiData\addons21\1322529746\gui\operations\deck_installation.py", line 185, in _install_deck
    import_result = importer.import_ankihub_deck(

  File "D:\Users\rcabezas\AnkiData\addons21\1322529746\main\importing.py", line 128, in import_ankihub_deck
    dids = self._import_notes(

  File "D:\Users\rcabezas\AnkiData\addons21\1322529746\main\importing.py", line 182, in _import_notes
    upserted_notes_data, skipped_notes_data = ankihub_db.upsert_notes_data(

  File "D:\Users\rcabezas\AnkiData\addons21\1322529746\db\db.py", line 113, in upsert_notes_data
    AnkiHubNote.insert(

  File "D:\Users\rcabezas\AnkiData\addons21\1322529746\lib\peewee.py", line 2011, in inner
    return method(self, database, *args, **kwargs)

  File "D:\Users\rcabezas\AnkiData\addons21\1322529746\lib\peewee.py", line 2082, in execute
    return self._execute(database)

  File "D:\Users\rcabezas\AnkiData\addons21\1322529746\lib\peewee.py", line 2887, in _execute
    return super(Insert, self)._execute(database)

  File "D:\Users\rcabezas\AnkiData\addons21\1322529746\lib\peewee.py", line 2600, in _execute
    cursor = database.execute(self)

  File "D:\Users\rcabezas\AnkiData\addons21\1322529746\lib\peewee.py", line 3299, in execute
    return self.execute_sql(sql, params)

  File "D:\Users\rcabezas\AnkiData\addons21\1322529746\lib\peewee.py", line 3291, in execute_sql
    cursor.execute(sql, params or ())

  File "D:\Users\rcabezas\AnkiData\addons21\1322529746\lib\peewee.py", line 3059, in __exit__
    reraise(new_type, new_type(exc_value, *exc_args), traceback)

  File "D:\Users\rcabezas\AnkiData\addons21\1322529746\lib\peewee.py", line 192, in reraise
    raise value.with_traceback(tb)

  File "D:\Users\rcabezas\AnkiData\addons21\1322529746\lib\peewee.py", line 3291, in execute_sql
    cursor.execute(sql, params or ())

peewee.OperationalError: database is locked


The above exception was the direct cause of the following exception:


Traceback (most recent call last):

  File "aqt.taskman", line 142, in _on_closures_pending

  File "aqt.taskman", line 86, in <lambda>

  File "aqt.taskman", line 106, in wrapped_done

  File "D:\Users\rcabezas\AnkiData\addons21\1322529746\gui\operations\deck_installation.py", line 45, in on_install_done
    on_done(future_with_exception(e))

  File "D:\Users\rcabezas\AnkiData\addons21\1322529746\gui\operations\ankihub_sync.py", line 73, in <lambda>
    on_done=lambda future: on_new_deck_subscriptions_done(

  File "D:\Users\rcabezas\AnkiData\addons21\1322529746\gui\operations\ankihub_sync.py", line 28, in on_new_deck_subscriptions_done
    on_done(future_with_exception(future.exception()))

  File "D:\Users\rcabezas\AnkiData\addons21\1322529746\gui\auto_sync.py", line 101, in sync_with_ankiweb
    future.result()

  File "concurrent.futures._base", line 439, in result

  File "concurrent.futures._base", line 391, in __get_result

  File "D:\Users\rcabezas\AnkiData\addons21\1322529746\gui\operations\deck_installation.py", line 43, in on_install_done
    import_results: List[AnkiHubImportResult] = future.result()

  File "concurrent.futures._base", line 439, in result

  File "concurrent.futures._base", line 391, in __get_result

  File "concurrent.futures.thread", line 58, in run

  File "D:\Users\rcabezas\AnkiData\addons21\1322529746\gui\operations\deck_installation.py", line 72, in <lambda>
    task=lambda: _download_and_install_decks_inner(ankihub_dids),

  File "D:\Users\rcabezas\AnkiData\addons21\1322529746\gui\operations\deck_installation.py", line 135, in _download_and_install_decks_inner
    raise exceptions[0]

1322529746.gui.exceptions.DeckDownloadAndInstallError: Error while downloading and installing deck c668e92c-cfcb-47dc-9c6f-8fc57c7a70db: database is locked

Sentry link (for developers)