Tag Toggler (Fork for 2.1) [Official thread]

If you have a problem with the add-on Tag Toggler (Fork for 2.1) post in this thread. This way I get notified. If you make a new thread I will likely miss it. If you post your comment, question or bug report on ankiweb as a review I won’t get notified. You really should post in this thread.

It seems that some part of this addon is conflicting with Arthur Milchior’s Directly review, without going through overview page addon.

It occurs once on clicking on a deck, and results in this error window.

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.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-18 01:23:49

Caught exception:
Traceback (most recent call last):
  File "D:\Data Storage\AnkiData\addons21\1024346707\main.py", line 41, in onStudyDeck
    self.onReview()
  File "D:\Data Storage\AnkiData\addons21\1024346707\main.py", line 17, in onReview
    self.moveToState("review")
  File "aqt\main.py", line 646, in moveToState
  File "aqt\main.py", line 668, in _reviewState
  File "aqt\reviewer.py", line 68, in show
  File "aqt\main.py", line 980, in setStateShortcuts
  File "anki\hooks.py", line 34, in runHook
  File "D:\Data Storage\AnkiData\addons21\1429363228\tag_toggler.py", line 59, in addShortcuts
    for k, v in mw.addonManager.getConfig(__name__).items():
AttributeError: 'NoneType' object has no attribute 'items'

On clicking the deck again, it works normally, but that error window is rather annoying as it increases clicks required to study, which is counter to the point of Arthur’s addon. If there exists an easy fix with either addon that I can implement myself, that would be great. I did submit an issue on Arthur’s GitHub around 6 months ago but it has no reply, so I thought I’d ask you.

1 Like

Apologies for the late response, I’d forgotten to check for replies.

I checked the config file, and there was invalid JSON in there, I deleted that and both addons work perfectly now :slight_smile:

Thank You!

Not relevant anymore, but here’s the issue I submitted on Arthur’s Github

Hello,

I am trying to delete the default shortcuts provided this add-on in the add-on config page. When I add my custom shortcuts and delete the default shortcuts and click “OK”, and revisit the config page, I still see the default shortcuts (Although the custom shortcuts that I added is also present).

Is there a way to circumvent this issue?

anki doesn’t allow to delete the default config. I just uploaded a new version with an empty default config (instead of a version of the one I used for myself …) so that you can adjust it as you like. update the add-ons, restart anki, reset the add-on config to defaults and restart. then you should no longer have unwanted config entries.

Hello,
I noticed that, if V3 scheduler is active, Ctrl+Z/undo/etc does not work anymore for this and other addons. E.g. if I use this addon to tag and suspend a card, then click Ctrl+Z, Anki says “nothing to undo”.

It might be due to this: 2021 scheduler - undo

@jcznk: Thanks for the info. Yes, my add-on breaks this. I’ve added a note to the add-on description. I’m not using the add-on at the moment and very few other people seem to use it so fixing this is (admittedly) a very low priority for me.

Hi there, I’m using version ⁨23.10 (51a10f09)⁩ Python 3.9.15 Qt 6.5.3 PyQt 6.5.3 and, unfortunately, this addon stop working. here is the message:
Error:
Extensões possivelmente envolvidas: ⁨Tag Toggler Fork for 21⁩

Caught exception:
Traceback (most recent call last):
File “C:\Users\bruno\AppData\Roaming\Anki2\addons21\1429363228\tag_toggler.py”, line 63, in
cuts.append((k, lambda vals=v: tagactions(vals)))
File “C:\Users\bruno\AppData\Roaming\Anki2\addons21\1429363228\tag_toggler.py”, line 73, in tagactions
edit_tag_dialog(note)
File “C:\Users\bruno\AppData\Roaming\Anki2\addons21\1429363228\tag_toggler.py”, line 111, in edit_tag_dialog
reset_and_redraw(same_card_shown=True)
File “C:\Users\bruno\AppData\Roaming\Anki2\addons21\1429363228\tag_toggler.py”, line 154, in reset_and_redraw
mw.reviewer.cardQueue.append(mw.reviewer.card)
AttributeError: ‘Reviewer’ object has no attribute ‘cardQueue’

Could you help me to fix it?

thanks for reporting this. I have no quick fix for this. I need to learn about the new v3 scheduler and still need to incorporate the changes from .45. Due to limited time I don’t know when I’ll do this.

hi,
i am still on 2.1.54 qt6 windows.

i installed the addon but the “t” now is anki’s statistics,
and config is not allowed (removed?) so i have no way to go now.

i watched glutaminexx?'s video and found this useful.

is this addon still working, how?
thanks

Thanks for the report. I’ve added this to my todo list but I won’t have time to update it before 2024 (and I donÄt know when in 2024) because of work, family etc.