mortii / anki-morphs

A MorphMan fork rebuilt from the ground up with a focus on simplicity, performance, and a codebase with minimal technical debt.
https://mortii.github.io/anki-morphs/
Mozilla Public License 2.0
52 stars 7 forks source link

learn now bug #137

Closed mortii closed 7 months ago

mortii commented 7 months ago
blocked main thread for 298ms:
  File "<string>", line 1, in <module>
  File "aqt", line 509, in run
  File "aqt", line 717, in _run
  File "aqt.browser.table.table", line 451, in _on_context_menu
  File "/home/neo/.local/share/Anki2/addons21/472573498/browser_utils.py", line 149, in run_learn_card_now
    mw.col.sched.reposition_new_cards(selected_cards, 0, 1, False, True)
  File "anki.scheduler.base", line 247, in reposition_new_cards
  File "anki._backend_generated", line 845, in sort_cards
  File "anki._backend", line 162, in _run_command

Traceback (most recent call last):
  File "aqt.taskman", line 142, in _on_closures_pending
  File "aqt.taskman", line 86, in <lambda>
  File "aqt.taskman", line 106, in wrapped_done
  File "aqt.operations", line 260, in wrapped_done
  File "/home/neo/.local/share/Anki2/addons21/472573498/reviewing_utils.py", line 192, in _show_card
    mw.reviewer._initWeb()
  File "aqt.reviewer", line 349, in _initWeb
  File "aqt.reviewer", line 789, in _bottomHTML
AttributeError: 'NoneType' object has no attribute 'time_taken'
mortii commented 7 months ago

the card was still shown as expected. catch and ignore the error?

mortii commented 7 months ago

the 'is None' checks above where the error occurs are not very robust apparently. Using try catch is probably just a better approach.

Vilhelm-Ian commented 7 months ago

I remember HQ also had an error where a value was None after a is None check

mortii commented 7 months ago

@Vilhelm-Ian yeah, it's very weird. Hopefully the try catch clause takes care of it.

github-actions[bot] commented 6 months ago

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.