BSCrumpton / Deadline2

An update of the Anki Deadline addon with GUI configuration.
GNU General Public License v3.0
8 stars 2 forks source link

Looks like 2.1.24beta3 breaks this #2

Closed AnKingMed closed 4 years ago

AnKingMed commented 4 years ago
Anki 2.1.24 (d3964603) Python 3.8.0 Qt 5.13.1 PyQt 5.14.1
Platform: Mac 10.15.4
Flags: frz=True ao=True sv=2
Add-ons, last update check: 2020-03-31 12:22:06
Add-ons possibly involved: ⁨Deadline2⁩

Caught exception:
Traceback (most recent call last):
  File "aqt/main.py", line 252, in onOpenProfile
  File "aqt/main.py", line 374, in loadProfile
  File "aqt/gui_hooks.py", line 1534, in __call__
  File "anki/hooks.py", line 585, in runHook
  File "/Users/Nick/Library/Application Support/Anki2/addons21/723639202/__init__.py", line 168, in allDeadlines
    (name, new_today, new_cards, days_left, per_day)=calc_new_cards_per_day(deck, days_left, silent)
  File "/Users/Nick/Library/Application Support/Anki2/addons21/723639202/__init__.py", line 140, in calc_new_cards_per_day
    new_cards, new_today = new_cards_in_settings_group(name)
  File "/Users/Nick/Library/Application Support/Anki2/addons21/723639202/__init__.py", line 65, in new_cards_in_settings_group
    group_id = find_settings_group_id(name)
  File "/Users/Nick/Library/Application Support/Anki2/addons21/723639202/__init__.py", line 44, in find_settings_group_id
    dconf = mw.col.decks.dconf
AttributeError: 'DeckManager' object has no attribute 'dconf'
BSCrumpton commented 4 years ago

I'll see about finding another way to accomplish the same thing. Thanks for the heads up!

BSCrumpton commented 4 years ago

mw.col.backend.all_deck_config() appears to end up returning the same thing (or at least similar enough that I'll be able to update) as mw.col.decks.dconf. I'll work on making an update soon, and testing it out on the beta.

note that the breaking change was this commit: https://github.com/ankitects/anki/commit/004cc2b5f8260c31b2177b4e544f1554e08f7a33#diff-8e89912ad6fdc8bbfb4c750574a28b89

BSCrumpton commented 4 years ago

@AnKingMed I've updated the addon and pushed it out to ankiweb. I've had some folks test it and they no longer have any issues. I'm going to go ahead and close this issue. If you test the addon and have errors that look similar to the above; feel free to re-open this issue.