The due date of cardsappears before the manually set date

I found two cards that were manually scheduled for 1.2 years and 10 months. Both appear again for the review long before the date they were scheduled to appear.

Note. I’m using a addon that was previously at this link and was deleted.

Unknown add-ons and the fact that the cards could have been modified since you originally rescheduled them means it’s going to be hard to figure out the problem. If you can cause the issue to occur without add-ons and have steps to reproduce the problem, please let us know.

1 Like

Thanks @dea
(Not only for this answer, but for the entire investment in this wonder of the world)
This is the relevant code from the aadon (after the accept in the addon window.) It seems to be calling Anki’s regular scheduler.


from aqt.operations.scheduling import forget_cards
from aqt.operations import CollectionOp



def prompt_new_interval():
    card = mw.reviewer.card
    m = MultiPrompt()
    if not m.exec():
        tooltip('canceld')
    else:
        if m.days == 0:
            forget_cards(
                parent=mw,
                card_ids=[card.id],
            ).run_in_background()
        else:
            # "Set Due Date" defaults to not adjusting the card interval, including ‘!’ will also reset the interval
            days_string = str(m.days)
            # work around old Rememorize Syntax:
            #   neg: change only due (this is the new Anki default for positive ints)
            #   pos: change due+ivl (old Anki default, in new Anki it also requires an "!"")
            if m.days > 0:
                days_string += "!"
            if m.days < 0:
                days_string = days_string[1:]  # remove leading minus
            print(f"days_string for cid '{card.id}' is {days_string}")
            CollectionOp(mw, lambda col: col.sched.set_due_date([card.id], days_string, None)).success(lambda _: tooltip("The rescheduling has been done")).run_in_background()

        mw.reviewer._answeredIds.append(card.id)
        mw.autosave()
        mw.reset()

The code you’ve quoted doesn’t look like it could cause the problem you described.

That’s why I wrote the topic here. Because it was clear to me that it was not related to the addon.
@dea I wouldn’t waste your time.

I appreciate the thought :slight_smile:

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.