Anki Forums

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