xquercus / load-balanced-scheduler

GNU General Public License v3.0
10 stars 9 forks source link

<class 'TypeError'>: 'float' object cannot be interpreted as an integer #9

Open galantra opened 4 years ago

galantra commented 4 years ago

Hello,

I've been receiving the same error for a particular card over the last few days. I don't fully understand the error message. My assumption is that there is no free slot where the card can be scheduled to. Therefore the error will subside in a few days.

Nevertheless, I'd like to inform you about a potential bug in the code. Maybe, probably, my above assumption is wrong.

I switched to the experimental V2 scheduler a few days before I received the error messaged.

Error 
    An error occurred. Please start Anki while holding down the shift key, which will temporarily disable the add-ons you have installed. 
    If the issue only occurs when add-ons are enabled, please use the Tools>Add-ons menu item to disable some add-ons and restart Anki, repeating until you discover the add-on that is causing the problem. 
    When you've discovered the add-on that is causing the problem, please report the issue on the add-ons section of our support site. 
    Debug info:
    Anki 2.1.15 (6661ba8a) Python 3.6.7 Qt 5.12.1 PyQt 5.11.3
    Platform: Windows 10
    Flags: frz=True ao=True sv=2

    Caught exception:
      File "aqt\webview.py", line 322, in handler
      File "aqt\reviewer.py", line 281, in _onAnswerButton
      File "<decorator-gen-256>", line 2, in _answerCard
      File "anki\hooks.py", line 74, in decorator_wrapper
      File "anki\hooks.py", line 65, in repl
      File "<decorator-gen-176>", line 2, in _answerCard
      File "anki\hooks.py", line 74, in decorator_wrapper
      File "anki\hooks.py", line 69, in repl
      File "aqt\reviewer.py", line 237, in _answerCard
      File "<decorator-gen-232>", line 2, in answerCard
      File "anki\hooks.py", line 74, in decorator_wrapper
      File "anki\hooks.py", line 71, in repl
      File "C:\Users\user\PortableApps\AnkiPortable\Anki2\addons21\rememorize_btn\main.py", line 59, in wrap_answerCard
        ret=_old(sched, card, ease)
      File "<decorator-gen-158>", line 2, in answerCard
      File "anki\hooks.py", line 74, in decorator_wrapper
      File "anki\hooks.py", line 65, in repl
      File "<decorator-gen-108>", line 2, in answerCard
      File "anki\hooks.py", line 74, in decorator_wrapper
      File "anki\hooks.py", line 71, in repl
      File "C:\Users\user\PortableApps\AnkiPortable\Anki2\addons21\1758624338\hoardersDelight.py", line 125, in sd_answerCard
        return _old(self, card, ease)
      File "anki\schedv2.py", line 69, in answerCard
      File "anki\schedv2.py", line 95, in _answerCard
      File "anki\schedv2.py", line 840, in _answerRevCard
      File "<decorator-gen-238>", line 2, in _rescheduleRev
      File "anki\hooks.py", line 74, in decorator_wrapper
      File "anki\hooks.py", line 71, in repl
      File "C:\Users\user\PortableApps\AnkiPortable\Anki2\addons21\rememorize_btn\main.py", line 92, in wrap_rescheduleRev
        ret=_old(sched, card, ease, early)
      File "anki\schedv2.py", line 876, in _rescheduleRev
      File "anki\schedv2.py", line 957, in _updateRevIvl
      File "anki\schedv2.py", line 912, in _nextRevIvl
      File "<decorator-gen-236>", line 2, in _constrainedIvl
      File "anki\hooks.py", line 74, in decorator_wrapper
      File "anki\hooks.py", line 71, in repl
      File "C:\Users\user\PortableApps\AnkiPortable\Anki2\addons21\rememorize_btn\main.py", line 74, in wrap_constrainedIvl
        return _old(sched, ivl, conf, prev, fuzz)
      File "anki\schedv2.py", line 946, in _constrainedIvl
      File "C:\Users\user\PortableApps\AnkiPortable\Anki2\addons21\208879074\load_balanced_scheduler.py", line 33, in load_balanced_ivl
        for check_ivl in range(min_ivl, max_ivl + 1):
    <class 'TypeError'>: 'float' object cannot be interpreted as an integer