dayjaby / yomisama

The newest version of the famous Anki plugin Yomichan
Other
6 stars 0 forks source link

Error when adding new items #14

Open Wakousei opened 1 week ago

Wakousei commented 1 week ago

When trying to add new vocabulary, I get this message:

Anki 24.06.3 (d678e393) (ao) Python 3.9.18 Qt 5.15.2 PyQt 5.15.5 Platform: Windows-10-10.0.22631

Traceback (most recent call last): File "aqt.webview", line 50, in cmd File "aqt.webview", line 160, in _onCmd File "aqt.webview", line 695, in _onBridgeCmd File "C:\Users\Wakousei\AppData\Roaming\Anki2\addons21\907186589\yomi_base\profiles\vocabulary.py", line 133, in onAnchorClicked self.runCommand(commands,index) File "C:\Users\Wakousei\AppData\Roaming\Anki2\addons21\907186589\yomi_base\profiles\vocabulary.py", line 234, in runCommand self.addFact(definition) File "C:\Users\Wakousei\AppData\Roaming\Anki2\addons21\907186589\yomi_base\profiles\profile.py", line 39, in addFact self.reader.ankiAddFact(self.name,self.markup(definition)) File "C:\Users\Wakousei\AppData\Roaming\Anki2\addons21\907186589\yomi_base\reader.py", line 630, in ankiAddFact self.anki.collection().sched.earlyAnswerCard(card,2) File "anki._legacy", line 80, in getattr AttributeError: 'Scheduler' object has no attribute 'earlyAnswerCard'

The item is still added to the deck, but it remains in the 'new' group instead of being moved to 'learning'.

dayjaby commented 1 week ago

Hey, thanks for reporting! Do you open Yomisama in any weird way? I expect the user to open Anki and then opening it either with Ctrl+Y or Tools > Yomisama, while the deck browser is open.

A custom scheduler is being monkey patched, when the deck browser is opened the first time: https://github.com/dayjaby/yomisama/blob/master/yomi_base/anki_bridge.py#L442

If you can't make that work, please try to disable the option in Yomisama: Edit > Preferences > Anki > uncheck "Put new/overwritten cards into the learning queue"

Wakousei commented 1 week ago

I open Yomisama via Tools menu in Anki like you said.

I tried unchecking the checkbox you mentioned. Error message doesn't appear, but added items are still left in 'new'.

Before the last update I used Yomisama with Anki 2.1.49 and had no such problem. Maybe this information would help.

dayjaby commented 4 days ago

@Wakousei can you give me a list of other plugins that you have installed? maybe some other plugin also manipulates the scheduler

Wakousei commented 3 days ago

I don't have any other plugins installed.