Error message for children of of filtered deck

Reproduction:
Create a filtered deck “filtered”.
From either “deck chooser” or “add note>deck”, create a deck “filtered::A”

And instead of a message which can be understood by user, you’ll get

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, repeat 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-ons section of our support site.

Debug info:
Anki 2.1.40 (cf446733) Python 3.8.1 Qt 5.15.1 PyQt 5.15.1
Platform: Linux
Flags: frz=True ao=True sv=1
Add-ons, last update check: 2021-02-13 16:37:39

Caught exception:

Traceback (most recent call last):
File “anki/decks.py”, line 248, in update
File “anki/rsbackend_gen.py”, line 241, in add_or_update_deck_legacy
File “anki/rsbackend.py”, line 256, in _run_command
anki.rsbackend.DeckIsFilteredError
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File “aqt/studydeck.py”, line 161, in onAddDeck
File “anki/decks.py”, line 127, in id
File “anki/decks.py”, line 252, in update
anki.errors.DeckRenameError: Couldn’t rename deck: deck was filtered

I’d suggest replacing it by something which is easier to read/understand. The same way that moving/renaming a deck to move it under a filtered deck would just show “deck was filtered” (which honestly is not so clear either if you don’t know anki internal, but less frightening)

2 Likes

Thanks Arthur, added to Clean up filtered deck error messages · Issue #1024 · ankitects/anki · GitHub