Anki Forums

Custom Study Error [Edit: Solved, for now]

This morning I went to create a custom study deck based on a set of tags and I keep getting the following 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 on the add-on support site.
Debug info:
Anki 2.1.43 (0fbae6bc) Python 3.8.6 Qt 5.14.2 PyQt 5.14.2
Platform: Windows 10
Flags: frz=True ao=True sv=2
Add-ons, last update check: 2021-04-06 22:01:33

Caught exception:
Traceback (most recent call last):
File “aqt\”, line 216, in accept
File “anki\”, line 1206, in rebuild_filtered_deck
File “anki_backend\”, line 176, in rebuild_filtered_deck
File “”, line 106, in _run_command
anki.errors.DBError: DBError { info: “SqliteFailure(Error { code: Unknown, extended_code: 1 }, Some(“Expression tree is too large (maximum depth 1000)”))”, kind: Other }

I’ve tried restarting Anki in safe mode, without any add-ons, but I am still getting the same error. I also updated Anki to the latest version, but I didn’t see any changes there. I also used the Check Database function in the Tools tab, also without any change. I’ve never had this problem in the past, but I can’t think of anything that I would have changed recently that could be causing the problem.

My exact steps:

Click on my main deck (Cheesy Lightyear)
Click custom study
Choose the “Study by card state or tag” option
Choose “New cards only”
Select the tag that I want
Receive the error code

Let me know if there’s anything I’m missing or if you have any ideas for me to try. Thanks in advance!

Edit: I seem to have found a way around the problem. I think the error might have been thrown because the tag that I was trying to study wasn’t a part of the main deck I was clicking on, but one of the sub-decks instead. (I tried recreating the problem I was having on my desktop on my laptop just in case I had a program that was causing the problem. Instead of the error, I got a notification that said that no cards matched the criteria I was looking for.) So creating a custom study session with the sub deck worked. I’ll update this post again if I start having other problems.

Try this suggestion:

1 Like