tvhong / incremental-reading

Anki add-on providing incremental reading features
https://ankiweb.net/shared/info/935264945
ISC License
33 stars 7 forks source link

[Anki 23.10 Beta 1] TypeError: _buttonTime() missing 1 required positional argument: 'v3_labels' #26

Closed khonkhortisan closed 1 year ago

khonkhortisan commented 1 year ago

pass it along

    #return _old(self, i)
    return _old(self, i, v3_labels)

Error when involving just this addon:

Error 
Se ha producido un error. Por favor inicia la Anki manteniendo presionadas ples teclas Mayús y la flecha hacia abajo, lo que desactivará temporalmente los extensiones que tienes instaladas. 
Si este error persiste sólo cuando tienes las extensiones activadas, utiliza Herramientas > Menú de Extensiones para deshabilitar alguna extensión y reinicia el Anki, repitiendo este proceso hasta que descubras qué extensión en concreto es la que causa el problema 
Cuando hayas descubierto la extensión que causaba el problema, por favor informa de esto a [sitio de soporte de extensiones](https://forums.ankiweb.net/c/add-ons/11). 
Información de depuración:
Anki 23.10 (1f6938d7) Python 3.9.15 Qt 6.5.2 PyQt 6.5.2
Platform: Windows-10-10.0.19045
Flags: frz=True ao=True sv=3
Add-ons, last update check: 2023-09-24 12:03:27
Complementos posiblemente implicados: ⁨Incremental Reading v4118 unofficial clone⁩

Caught exception:
Traceback (most recent call last):
  File "aqt.webview", line 608, in handler
  File "aqt.reviewer", line 685, in _onTypedAnswer
  File "aqt.reviewer", line 432, in _showAnswer
  File "aqt.reviewer", line 743, in _showEaseButtons
  File "aqt.reviewer", line 825, in _answerButtons
  File "aqt.reviewer", line 806, in but
  File "decorator", line 232, in fun
  File "anki.hooks", line 89, in decorator_wrapper
  File "anki.hooks", line 86, in repl
  File "C:\Users\Khonkhortisan\AppData\Roaming\Anki2\addons21\999215520\main.py", line 212, in buttonTime
    return _old(self, i)
TypeError: _buttonTime() missing 1 required positional argument: 'v3_labels'

Error when involving 3 addons:

Error 
Se ha producido un error. Por favor inicia la Anki manteniendo presionadas ples teclas Mayús y la flecha hacia abajo, lo que desactivará temporalmente los extensiones que tienes instaladas. 
Si este error persiste sólo cuando tienes las extensiones activadas, utiliza Herramientas > Menú de Extensiones para deshabilitar alguna extensión y reinicia el Anki, repitiendo este proceso hasta que descubras qué extensión en concreto es la que causa el problema 
Cuando hayas descubierto la extensión que causaba el problema, por favor informa de esto a [sitio de soporte de extensiones](https://forums.ankiweb.net/c/add-ons/11). 
Información de depuración:
Anki 23.10 (1f6938d7) Python 3.9.15 Qt 6.5.2 PyQt 6.5.2
Platform: Windows-10-10.0.19045
Flags: frz=True ao=True sv=3
Add-ons, last update check: 2023-09-24 10:31:28
Complementos posiblemente implicados: ⁨Incremental Reading v4118 unofficial clone, Advanced Review Bottom Bar, Image Occlusion Enhanced⁩

Caught exception:
Traceback (most recent call last):
  File "aqt.webview", line 608, in handler
  File "aqt.reviewer", line 685, in _onTypedAnswer
  File "decorator", line 232, in fun
  File "anki.hooks", line 89, in decorator_wrapper
  File "anki.hooks", line 86, in repl
  File "C:\Users\Khonkhortisan\AppData\Roaming\Anki2\addons21\1374772155\main.py", line 278, in on_show_answer
    return _old(self)
  File "aqt.reviewer", line 432, in _showAnswer
  File "aqt.reviewer", line 743, in _showEaseButtons
  File "C:\Users\Khonkhortisan\AppData\Roaming\Anki2\addons21\1136455830\Button_Colors.py", line 231, in _answerButtons
    buf += but(ease, label)
  File "C:\Users\Khonkhortisan\AppData\Roaming\Anki2\addons21\1136455830\Button_Colors.py", line 153, in but
    due_plain = self._buttonTime(i, v3_labels=labels)
  File "decorator", line 232, in fun
  File "anki.hooks", line 89, in decorator_wrapper
  File "anki.hooks", line 86, in repl
  File "C:\Users\Khonkhortisan\AppData\Roaming\Anki2\addons21\999215520\main.py", line 212, in buttonTime
    return _old(self, i)
TypeError: _buttonTime() missing 1 required positional argument: 'v3_labels'

Describe the bug unexpected error happens when flipping a card

To Reproduce Steps to reproduce the behavior:

  1. start a review session
  2. press space
  3. card flips, error appears

Expected behavior no error, I didn't expect this addon's code path to be used on a non-IR card

Screenshots If applicable, add screenshots to help explain your problem.

Specs (please complete the following information):

Additional context Add any other context about the problem here.

tvhong commented 1 year ago

Hm.. I cannot reproduce this issue on 23.10 beta 6.

I don't see the following error when reviewing cards.

TypeError: _buttonTime() missing 1 required positional argument: 'v3_labels'
tvhong commented 1 year ago

Can you try again on 23.10 beta 6?

tvhong commented 1 year ago

Another user also reported this issue on the Anki forum: https://forums.ankiweb.net/t/incremental-reading-add-on-unofficial-clone/21331/15

I suspect it's related to enabling FSRS scheduler. Will investigate as part of https://github.com/tvhong/incremental-reading/issues/23 .