School deck added has Anking cards, error syncing Anking after

I downloaded and added a new deck from my school into Anki. Ever since then, I have been getting this error message every time I sync anki/ankihub after doing a few cards. I tried disabling the ankihub add on and the error went away. Deleting the new deck/ redownloading the ankihub add on did not resolve the error message.

An error occurred. Please start Anki while holding down the shift key, which will temporarily disable the add-ons you have installed.
If the issue only occurs when add-ons are enabled, please use the Tools > Add-ons menu item to disable some add-ons and restart Anki, repeating until you discover the add-on that is causing the problem.
When you’ve discovered the add-on that is causing the problem, please report the issue to the add-on author.
Debug info:
Anki 2.1.54 (b6a7760c) Python 3.9.7 Qt 5.15.2 PyQt 5.15.5
Platform: Windows 10
Flags: frz=True ao=True sv=3
Add-ons, last update check: 2023-02-19 00:18:51

Caught exception:
Traceback (most recent call last):
File “aqt.taskman”, line 122, in _on_closures_pending
File “aqt.taskman”, line 71, in
File “aqt.taskman”, line 90, in wrapped_done
File “aqt.sync”, line 104, in on_future_done
File “anki.dbproxy”, line 36, in begin
File “anki._backend”, line 90, in db_begin
File “anki._backend”, line 106, in _db_command
anki.errors.DBError: DbError { info: “SqliteFailure(Error { code: Unknown, extended_code: 1 }, Some("cannot start a transaction within a transaction"))”, kind: Other }

Note: I also had just updated my ankihub to the latest version of the date of this post

This is a known bug that we have been working on. The official report and solution are posted in this thread and should resolve your issues. Please give that a shot and report if it is working for you.

I have tried the suggested solution but it did not work. The problem appears different.

  1. I did not receive the same error messages documented in the post you cited. On boot up/ syncing right after boot up, no error message is shown. I only received an error message upon pressing the ‘sync’ button for Anki after doing 1-3 cards. The content of the error message is much shorter as well.

  2. My “sync with ankihub” button via add-on, and “make a suggestion button” are not greyed out and still works. It says “Ankihub: no new updates” upon syncing via the add-on button.

For reference, I did the following steps as suggested:

  • start Anki in safe mode (hold shift while starting Anki, this will temporarily disable all add-ons)
  • delete the AnkiHub add-on
  • install the add-on, this is the add-on’s code: 1322529746 (See AnkiHub - AnkiWeb ).
  • re-subscribe to my decks from the add-on

Can you share the error message you are still receiving?

The error message is the same as the one reported in my original post. I will paste it again here:

This are my logs for my bug report: ankihub_addon_logs_e8153_1676897853.log

Error
An error occurred. Please start Anki while holding down the shift key, which will temporarily disable the add-ons you have installed.
If the issue only occurs when add-ons are enabled, please use the Tools > Add-ons menu item to disable some add-ons and restart Anki, repeating until you discover the add-on that is causing the problem.
When you’ve discovered the add-on that is causing the problem, please report the issue to the add-on author.
Debug info:
Anki 2.1.54 (b6a7760c) Python 3.9.7 Qt 5.15.2 PyQt 5.15.5
Platform: Windows 10
Flags: frz=True ao=True sv=3
Add-ons, last update check: 2023-02-19 21:52:48

Caught exception:
Traceback (most recent call last):
File “aqt.taskman”, line 122, in _on_closures_pending
File “aqt.taskman”, line 71, in
File “aqt.taskman”, line 90, in wrapped_done
File “aqt.sync”, line 104, in on_future_done
File “anki.dbproxy”, line 36, in begin
File “anki._backend”, line 90, in db_begin
File “anki._backend”, line 106, in _db_command
anki.errors.DBError: DbError { info: “SqliteFailure(Error { code: Unknown, extended_code: 1 }, Some("cannot start a transaction within a transaction"))”, kind: Other }

The problem might be because the school deck I downloaded has some overlapping Anking cards in it as well. The creator of the school deck copied some of his cards from Anking. When i installed it, this may have interfered with my personal Anking deck cards, and now it has issue syncing with Ankihub. Upon deleting the school deck and syncing my Anking deck with Ankihub again, it says that it is missing certain values and requires a repair.

Once the Anking deck has been repaired, it still shows the error message upon every sync. I’m considering resetting my Anking deck to try and remove any potential formatting errors from this incident.

Would it be helpful for me to send over the school deck? This might help troubleshoot the bug. Do let me know how I can send it privately if required.

This sounds to me like a known issue when AnkiHub has to handle duplicated cards in multiple decks. I’ve tagged @jakub.f to take a closer look - but I highly suspect the issue is related to your personal deck. It will be hard to give any nuanced advice without looking further, but the simplest solution in this case may be different profiles

1 Like

Sounds good, thank you. How do I resolve my current syncing issue? Do I redownload anki?

Redownloading the ankihub add-on does not seem to resolve the issue.

Try updating to 2.1.56 Qt6 if your system allows, starting anki in safe mode, deleting the add on and reinstalling it, resubscribe to decks if needed, and see if the issue persists. If your system doesn’t allow, or this does not fix the issue, I will defer to @jakub.f or one of our other devs.

I have done as you suggested and the problem is still there, kindly advise @jakub.f

I have the same problem as you. Not sure if it is related to school deck, as I have not imported any new decks (aside from AnkiHub). I did, however, create my own cards in a separate deck.

Error
An error occurred. Please start Anki while holding down the shift key, which will temporarily disable the add-ons you have installed.
If the issue only occurs when add-ons are enabled, please use the Tools > Add-ons menu item to disable some add-ons and restart Anki, repeating until you discover the add-on that is causing the problem.
When you’ve discovered the add-on that is causing the problem, please report the issue to the add-on author.
Debug info:
Anki 2.1.58 (ab8b1465) Python 3.9.15 Qt 6.4.2 PyQt 6.4.0
Platform: Windows-10-10.0.19045
Flags: frz=True ao=True sv=2
Add-ons, last update check: 2023-02-21 19:37:52

Caught exception:
Traceback (most recent call last):
File “aqt.taskman”, line 122, in _on_closures_pending
File “aqt.taskman”, line 71, in
File “aqt.taskman”, line 90, in wrapped_done
File “aqt.sync”, line 100, in on_future_done
File “anki.dbproxy”, line 36, in begin
File “anki._backend”, line 100, in db_begin
File “anki._backend”, line 116, in _db_command
anki.errors.DBError: DbError { info: “SqliteFailure(Error { code: Unknown, extended_code: 1 }, Some("cannot start a transaction within a transaction"))”, kind: Other }

1 Like

It is nice to see another kindred soul :"). Note that you didn’t import a school deck. I have also created some of my own cards in a separate deck. Will investigate further.

Let’s update here if we make any progress.

1 Like

@Pav @Montymole
I’m working on solving this problem now. I’m sure that it has nothing to do with the contents of the decks so don’t worry about that.

Can you try manually syncing with AnkiHub by using the Sync with AnkiHub action (main Anki window → AnkiHub → Sync with AnkiHub)? I suspect that this will work. I think the reason why it doesn’t work when syncing with AnkiHub and AnkiWeb could be that these two syncs interfere with each other in some circumstances.

1 Like

Yes, I can sync just fine using the method you posted above. Thanks!

1 Like

I also posted having this error a few days back as well. My post is currently closed, because this thread will hopefully have the solution.

2 Likes

@jakub.f noted, thanks so much for working on this issue. Will continue to keep an eye on this thread for the solution. For now, I will just individually sync Ankihub as suggested. Appreciate everything you are doing for the Anki community.

1 Like

We will soon release an update that fixes this, however there is one thing you can do now to prevent the error from showing up every time you sync with AnkiWeb. You can change a setting of the add-on to disable automatic syncing with AnkiHub.

Go to the config of the add-on (main Anki window → Tools → Add-ons → Select AnkiHub from the list → Click the Config button).
In this config window you can change the auto_sync option to never.
Then restart Anki. After this change the add-on won’t try to sync automatically with AnkiHub, but you will still be able to sync manually (main Anki window → AnkiHub → Sync with AnkiHub).

1 Like

This is appreciated, if you would be willing to post an update on this post when an update goes out that addresses this error that would be super helpful.

For the time being, would it be possible to confirm that this error does not impact syncing with AnkiHub and that even if we have this error message pop up we will have the appropriate updates synced on our account?

1 Like