Bug report: True retention

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, repeat 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.65 (aa9a734f) Python 3.9.15 Qt 6.5.0 PyQt 6.5.0
Platform: macOS-13.4-arm64-arm-64bit
Flags: frz=True ao=True sv=3
Add-ons, last update check: 2023-06-12 17:33:31
Add-ons possibly involved: ⁨FSRS4Anki Helper⁩

Caught exception:
Traceback (most recent call last):
File “aqt.webview”, line 46, in cmd
File “aqt.webview”, line 153, in _onCmd
File “aqt.webview”, line 662, in _onBridgeCmd
File “aqt.toolbar”, line 411, in _linkHandler
File “aqt.toolbar”, line 432, in _statsLinkHandler
File “aqt.main”, line 1232, in onStats
File “aqt”, line 130, in open
File “decorator”, line 232, in fun
File “anki.hooks”, line 89, in decorator_wrapper
File “anki.hooks”, line 80, in repl
File “aqt.stats”, line 178, in init
File “aqt.stats”, line 224, in refresh
File “anki.stats”, line 113, in report
File “/Users/timyan/Library/Application Support/Anki2/addons21/759844606/stats.py”, line 47, in todayStats_new
retention, stability, burden, count = retention_stability_burden(lim)
File “/Users/timyan/Library/Application Support/Anki2/addons21/759844606/stats.py”, line 39, in retention_stability_burden
return recall_sum / cnt, stability_sum / cnt, burden_sum, cnt
ZeroDivisionError: division by zero

it doesnt allow me to use true retention when my fsrs4anki is on

There are several types of True Retention so you can try any of them to see if they work.

Alternatively, you can report the issue to FSRS4 Helper’s Github issues.(It is a compatibility issue with add-ons, so to be precise, it could be an enhancement request.)

Please check updates. I submit a patch, which fixed this bug.

The error is still there

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, repeat 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.65 (aa9a734f) Python 3.9.15 Qt 6.5.0 PyQt 6.5.0
Platform: macOS-13.4-arm64-arm-64bit
Flags: frz=True ao=True sv=3
Add-ons, last update check: 2023-06-14 10:40:12
Add-ons possibly involved: ⁨FSRS4Anki Helper⁩

Caught exception:
Traceback (most recent call last):
File “aqt.stats”, line 170, in
File “aqt.stats”, line 218, in changeScope
File “aqt.stats”, line 224, in refresh
File “anki.stats”, line 113, in report
File “/Users/timyan/Library/Application Support/Anki2/addons21/759844606/stats.py”, line 49, in todayStats_new
retention, stability, burden, count = retention_stability_burden(lim)
File “/Users/timyan/Library/Application Support/Anki2/addons21/759844606/stats.py”, line 34, in retention_stability_burden
retention_stability_burden_list = list(map(lambda x: (math.pow(0.9, x[0] / x[1]), x[1], 1/max(1, x[2])), delay_stability_ivl_list))
File “/Users/timyan/Library/Application Support/Anki2/addons21/759844606/stats.py”, line 33, in
delay_stability_ivl_list = map(lambda x: (today - min(today, x[0]), json.loads(json.loads(x[1])[‘cd’])[‘s’], x[2]), last_due_and_custom_data_and_ivl_rows)
KeyError: ‘s’

It is new error. Could you report this bug in GitHub?

I have updated the add-on just now. Could you update it and give it a try?

ive uploaded

its fine now, thank you so much, sorry for bothering

1 Like