daedsidog / Anki-autoLapseNewInterval

An Anki 2.1 addon which automatically adjusts the new lapse interval.
GNU General Public License v3.0
6 stars 1 forks source link

Anki 2.1.35 (84dcaa86) Error When Loading Anki #4

Closed Kosezu closed 3 years ago

Kosezu commented 4 years ago

Debug info: Anki 2.1.35 (84dcaa86) Python 3.8.0 Qt 5.14.2 PyQt 5.14.2 Platform: Windows 10 Flags: frz=True ao=True sv=2 Add-ons, last update check: 2020-10-23 12:59:09

Caught exception: Traceback (most recent call last): File "aqt\progress.py", line 53, in handler File "aqt\main.py", line 142, in on_window_init File "aqt\main.py", line 190, in setupProfileAfterWebviewsLoaded File "aqt\main.py", line 231, in setupProfile File "<C:\Program Files\Anki\decorator.pyc:decorator-gen-212>", line 2, in loadProfile File "anki\hooks.py", line 638, in decorator_wrapper File "anki\hooks.py", line 633, in repl File "aqt\main.py", line 427, in loadProfile File "aqt\gui_hooks.py", line 2033, in call File "anki\hooks.py", line 583, in runHook File "C:\Users\ykama\AppData\Roaming\Anki2\addons21\372281481__init.py", line 78, in adjLapse_startup adjLapse_all(True) # Includes functions below File "C:\Users\ykama\AppData\Roaming\Anki2\addons21\372281481__init.py", line 69, in adjLapse_all eval_lapsed_newIvl(silent) File "C:\Users\ykama\AppData\Roaming\Anki2\addons21\372281481__init.py", line 205, in eval_lapsed_newIvl adj_lapsed_newIvl(dconf['id'], silent) File "C:\Users\ykama\AppData\Roaming\Anki2\addons21\372281481\init__.py", line 175, in adj_lapsed_newIvl lapsed_success_rate, lapsed_rev_records = og_lapsed_success_rate(name, card_sample_size) File "C:\Users\ykama\AppData\Roaming\Anki2\addons21\372281481\init.py", line 148, in og_lapsed_success_rate decks = find_decks_in_settings_group(group_id) File "C:\Users\ykama\AppData\Roaming\Anki2\addons21\372281481\init__.py", line 55, in find_decks_in_settings_group if 'conf' in decks[d] and int(decks[d]['conf']) == int(group_id): File "anki\decks.py", line 47, in getitem__ TypeError: int() argument must be a string, a bytes-like object or a number, not 'dict'

daedsidog commented 3 years ago

I've looked into it and it is something to do with the way the Anki team changed how iteration through decks works. I may get around to fix this, but in the mean time I recommend that you don't hold your breathe and use an older Anki version.

daedsidog commented 3 years ago

Fixed. You could have held your breathe.

bxkx commented 3 years ago

Thanks for fixing it!

rumDMC commented 3 years ago

Fixed. You could have held your breathe.

It's fixed?! Where can I get the updated version? I'm on 2.1.35 and have been really bummed I havent been able to use this addon. If it helps at all, here is the error I get when starting anki

Debug info: Anki 2.1.35 (84dcaa86) Python 3.8.0 Qt 5.14.2 PyQt 5.14.2 Platform: Windows 10 Flags: frz=True ao=True sv=2 Add-ons, last update check: 2021-01-01 17:42:36

Caught exception: Traceback (most recent call last): File "aqt\progress.py", line 53, in handler File "aqt\main.py", line 142, in on_window_init File "aqt\main.py", line 190, in setupProfileAfterWebviewsLoaded File "aqt\main.py", line 231, in setupProfile File "aqt\main.py", line 427, in loadProfile File "aqt\gui_hooks.py", line 2033, in call File "anki\hooks.py", line 583, in runHook File "C:\Users\Dylan M Cooper\AppData\Roaming\Anki2\addons21\372281481__init.py", line 78, in adjLapse_startup adjLapse_all(True) # Includes functions below File "C:\Users\Dylan M Cooper\AppData\Roaming\Anki2\addons21\372281481__init.py", line 69, in adjLapse_all eval_lapsed_newIvl(silent) File "C:\Users\Dylan M Cooper\AppData\Roaming\Anki2\addons21\372281481__init.py", line 205, in eval_lapsed_newIvl adj_lapsed_newIvl(dconf['id'], silent) File "C:\Users\Dylan M Cooper\AppData\Roaming\Anki2\addons21\372281481\init__.py", line 175, in adj_lapsed_newIvl lapsed_success_rate, lapsed_rev_records = og_lapsed_success_rate(name, card_sample_size) File "C:\Users\Dylan M Cooper\AppData\Roaming\Anki2\addons21\372281481\init.py", line 148, in og_lapsed_success_rate decks = find_decks_in_settings_group(group_id) File "C:\Users\Dylan M Cooper\AppData\Roaming\Anki2\addons21\372281481\init__.py", line 55, in find_decks_in_settings_group if 'conf' in decks[d] and int(decks[d]['conf']) == int(group_id): File "anki\decks.py", line 47, in getitem__ TypeError: int() argument must be a string, a bytes-like object or a number, not 'dict'

bxkx commented 3 years ago

Replace the init.py with this version https://github.com/daedsidog/Anki-autoLapseNewInterval/blob/master/__init__.py

rumDMC commented 3 years ago

Replace the init.py with this version https://github.com/daedsidog/Anki-autoLapseNewInterval/blob/master/__init__.py

When I click that link I don't see anywhere for me to download. And when I go to my computer files and find the current init.py file it won't let me open it ("The specified module could not be found"). I may be in over my head but can you elaborate on how to switch out versions?

daedsidog commented 3 years ago

Replace the init.py with this version https://github.com/daedsidog/Anki-autoLapseNewInterval/blob/master/__init__.py

When I click that link I don't see anywhere for me to download. And when I go to my computer files and find the current init.py file it won't let me open it ("The specified module could not be found"). I may be in over my head but can you elaborate on how to switch out versions?

I've made it easier for you. Check out the releases where you can download the latest file.

rumDMC commented 3 years ago

It's working! Thank you both so freaking much!!!!