Straight Reward [Official support]

Hi, I think I found a bug.

Begin at staight of length is set to 1 when using the regular dialog, and it is seen as 2 when using the old dialog by pressing down the shift key. This is true when clicking the button to reset the default values. Not sure if it is just wrongly displayed.

I am using 2.1.54. Thank you

I had a similar issue, I had to open the shortcut folder and change the default values there to my values to resolve it.

Currently, you can only configure Straight Reward through the old dialog.

Hi, does this add-on count the amount of times I press “Good” in the learning phase? I have configured my learning phase to have quite a bit more steps than the default, which works better for me.

Should I configure this add-on to start rewarding me only after I’ve finished my learning steps? So something like this:

Begin at straight length of: (learning steps + 1)

Which setting do you recommend in my case?

No, it doesn’t change the difficulty as long as the card is in the re-learning phase.

EDIT: Found the mention of the sync_log on the addon page, that answers my question. :slight_smile:

Thanks so much for your work on this addon! Is there any way to see what cards have been given a straight reward?

I’m really excited about this add-on! But I’m concerned that it isn’t working working on the reviews I sync from AnkiDroid.

I was having the v3/2.1.49 issue yesterday (notification, but no change to ease), so I upgraded AnkiDesktop to ⁨2.1.54 just to get this to work with v3. I was able to verify that the ease increase was correctly applied to the rest of my reviews on AnkiDesktop yesterday.

Today I did my reviews on AnkiDroid (v2.15.6). After sync, I got the notification that ease was updated on 15 cards. I can see those IDs in sync_log, but none of those cards show any change in the ease.

Ex. Based on my settings …

… easeplus was correctly calculated to 10 …

… but ease was not changed on that card.

I haven’t been able to find anything about this in any of the forums. Is this a known issue?

1 Like

I updated to 2.1.56 today (for other reasons) and I am seeing the same issue when I sync reviews from AnkiDroid. Notification that ease was updated, new records added to sync_log, but no change in ease for those cards.

1 Like

Thanks for your work in creating and maintaining this addon. Question - If a card has been tagged as a leech, does it matter as far as this addon is concerned? Can it still rise again in ease?

I can confirm from my own experience that the leech tag does not keep the ease from rising again.

1 Like

In 2.1.60, if I turn off Enable notifications and hit Save, notifications remain enabled. This happens both with my v3+FSRS profile as well as a test v2 profile. I am not sure in which version this started, because I didn’t feel a need to disable notifications until switching to FSRS, which doesn’t use ease at all, but I still like Straight Reward doing its thing in the background, just in case.

Version ⁨2.1.60 (76d88073)⁩
Python 3.9.15 Qt 6.4.2 PyQt 6.4.0
Windows 11

Having the same issue.

Pre-releas Anki 2.1.66rc1 seems to have an error in Straight Reward and can’t be used. This occurs in both Qt5 and Qt6 (Windows).

Debug info:
Anki 2.1.66 (70506aeb) Python 3.9.15 Qt 6.5.2 PyQt 6.5.2
Platform: Windows-10-10.0.22621
Flags: frz=True ao=True sv=3
Add-ons, last update check: 2023-08-22 00:38:49
Add-ons possibly involved: <U+2068>Straight Reward<U+2069>

Caught exception:
Traceback (most recent call last):
  File "aqt.webview", line 46, in cmd
  File "aqt.webview", line 153, in _onCmd
  File "aqt.webview", line 665, in _onBridgeCmd
  File "aqt.reviewer", line 581, in _linkHandler
  File "aqt.reviewer", line 449, in _answerCard
  File "_aqt.hooks", line 4224, in __call__
  File "C:\Users\shigg\AppData\Roaming\Anki2\addons21\957961234\src\lib\", line 100, in <lambda>
    lambda ease_tuple, reviewer, card: on_will_answer_card(
  File "C:\Users\shigg\AppData\Roaming\Anki2\addons21\957961234\src\lib\", line 84, in on_will_answer_card
    check_straight_reward(gains, reviewer, card, ease_tuple[1])
  File "C:\Users\shigg\AppData\Roaming\Anki2\addons21\957961234\src\lib\", line 70, in check_straight_reward
    reviewer.set_scheduling_states(reviewer._state_mutation_key, next_states)
TypeError: set_scheduling_states() takes 2 positional arguments but 3 were given

Same error here with Anki 2.1.66 on Linux:

Informazioni di debug:
Anki 2.1.66 (cf16ce1d) Python 3.11.3 Qt 6.5.2 PyQt 6.5.2
Platform: Linux-6.4.12-arch1-1-x86_64-with-glibc2.38
Flags: frz=False ao=True sv=3
Add-ons, last update check: 2023-08-26 20:51:28
Add-on che potrebbero essere coinvolti: <U+2068>Straight Reward<U+2069>

Caught exception:
Traceback (most recent call last):
  File "/usr/lib/python3.11/site-packages/aqt/", line 607, in handler
  File "/usr/lib/python3.11/site-packages/aqt/", line 574, in _onAnswerButton
  File "/usr/lib/python3.11/site-packages/aqt/", line 449, in _answerCard
    proceed, ease = gui_hooks.reviewer_will_answer_card(
  File "/usr/lib/python3.11/site-packages/_aqt/", line 3433, in __call__
    ease_tuple = filter(ease_tuple, reviewer, card)
  File "/home/marco/.local/share/Anki2/addons21/957961234/src/lib/", line 100, in <lambda>
    lambda ease_tuple, reviewer, card: on_will_answer_card(
  File "/home/marco/.local/share/Anki2/addons21/957961234/src/lib/", line 84, in on_will_answer_card
    check_straight_reward(gains, reviewer, card, ease_tuple[1])
  File "/home/marco/.local/share/Anki2/addons21/957961234/src/lib/", line 70, in check_straight_reward
    reviewer.set_scheduling_states(reviewer._state_mutation_key, next_states)
TypeError: Reviewer.set_scheduling_states() takes 2 positional arguments but 3 were given

Hi, if you just updated your Anki to 2.1.66 and you’re getting the error posted above, I was able to fix it by doing the following:

  1. Navigate into the addon’s “lib” folder (for me it’s “…/Anki2/addons21/957961234/src/lib/”)
  2. Replace the entirety of “” with the following:
from typing import Tuple

from aqt import mw
from aqt.gui_hooks import (

from aqt.utils import tooltip

from anki.hooks import card_will_flush
from anki.consts import CARD_TYPE_REV, REVLOG_REV
from anki.collection import Collection
from import Card

from .logic import (

def display_success(straightlen: int, easeplus: int):
    MSG = (
        f"Succeeded {straightlen} times in a row.<br>"
        f"Gained <b>{easeplus}</b> Ease Factor!"


def card_success(card: Card, answer: Button) -> bool:
    # CARD_TYPE_* does not match to REVLOG_*, because 3 is RELRN as card type, but CRAM as revlog
    return card.type == CARD_TYPE_REV and review_success((REVLOG_REV, answer))

def from_rescheduling_deck(card: Card) -> bool:
    # check whether it is a filtered deck ("dynamic") which does not reschedule
    return (
        not mw.col.decks.is_filtered(card.did) or mw.col.decks.get(card.did)["resched"]

class SetSchedulingStatesRequest:
    def __init__(self, key, states):
        self.key = key
        self.states = states

def check_straight_reward(
    gains: dict,
    card: Card,
    rating: int,
) -> None:
    if not card_success(card, rating) or not from_rescheduling_deck(card):

    # plus one for the current success
    straightlen = get_straight_len( + 1
    easeplus = get_easeplus(card, straightlen)

    if not easeplus:

    if reviewer._v3:
        next_states = reviewer.get_scheduling_states()

        if rating == 3:
   += easeplus / 1000
   += easeplus / 1000

        request = SetSchedulingStatesRequest(reviewer._state_mutation_key, next_states)
        gains[] = easeplus

    if notifications_enabled(card):
        display_success(straightlen, int(easeplus / 10))

def on_will_answer_card(
    gains: dict,
    ease_tuple: tuple[bool, int],
    card: Card,
) -> tuple[bool, int]:
    check_straight_reward(gains, reviewer, card, ease_tuple[1])
    return ease_tuple

def flush_with_straight_reward(gains: dict, card: Card) -> None:
    if not in gains:

    card.factor += gains[]
    del gains[]

def init_review_hook():
    gains = {}

        lambda ease_tuple, reviewer, card: on_will_answer_card(
            gains, ease_tuple, reviewer, card

        lambda card: flush_with_straight_reward(gains, card),

It should work again.

From checking the github, it is my understanding that there have been commits to the repo to provide a patch for 2.1.66 users in the future, correct? I am not very technically inclined, so I just wanted to make sure. Thank you and everyone who contributes to the project for their work!