Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG + FIX] Crash on startup and deck configuration not updating in Anki 24+ #37

Open
kaderator2 opened this issue Dec 16, 2024 · 0 comments

Comments

@kaderator2
Copy link

Issues Description

The addon has two major issues in Anki 24+:

  1. Crashes on startup due to accessing deprecated deck configuration properties
  2. Unable to properly modify deck configuration settings after fixing the crash

Issue 1: Crash on Startup

The addon crashes when trying to access deck configurations using the old conf property which no longer exists in Anki 24+.

Error trace:

Traceback (most recent call last):
  File "/home/chade/.local/share/Anki2/addons21/723639202/config.py", line 89, in readValues
    self.applyDeadlineForDeck(deck,date)
  File "/home/chade/.local/share/Anki2/addons21/723639202/config.py", line 105, in applyDeadlineForDeck
    if (mw.col.decks.by_name(deck)['conf'] == 1):
        ~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^
KeyError: 'conf'

Current Behavior

  • Deadline processing appears to work but does not affect deck settings
  • Setting new cards per day isn't updating in deck settings
  • Setting review limits isn't updating in deck settings

Expected Behavior

  • Processing deadlines should modify deck-specific overrides for new cards/day
  • Should set maximum reviews/day to 10x new cards/day
  • Changes should be visible immediately in deck settings

Fix Available

I have created a pull request that fixes these issues by:

  • Using the correct deck properties (newLimit and reviewLimit) for overrides
  • No longer creating duplicate deck presets
  • Properly working with the current Anki API

Environment

  • Anki Version: 24.11
  • Python Version: 3.12.7
  • Qt Version: 6.8.1
  • PyQt Version: 6.8.0
  • Platform: Linux
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant