AnKing-VIP / advanced-browser

Anki add-on with card browser enhancements.
GNU General Public License v3.0
58 stars 13 forks source link

broken with: Anki 2.1.22 and AB version from ankiweb from 2020-02-21: 'CardStats' object has no attribute 'col' #147

Closed ijgnd closed 1 year ago

ijgnd commented 2 years ago

tldr:

 

 

Details:

I just tested with Anki 2.1.22 and just the AB add-on that I donwload from ankiweb today. The ankiweb compatibility listing looks like this as of 2022-09-27:

Supported Anki versions:
    2.1.0-2.1.23 (Updated 2020-02-21)
    2.1.24-2.1.34 (Updated 2020-10-04)
    2.1.35-2.1.40 (Updated 2020-11-08)
    2.1.41-2.1.44 (Updated 2022-09-27)
    2.1.45-2.1.50+ (Updated 2022-09-27)

I get this error message for each card many times:

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-on support site](https://help.ankiweb.net/discussions/add-ons/).
Debug info:
Anki 2.1.22 (0ecc189a) Python 3.8.1 Qt 5.14.1 PyQt 5.14.1
Platform: Linux
Flags: frz=True ao=True sv=2
Add-ons, last update check: 2022-09-27 11:27:09
Add-ons possibly involved: ⁨Advanced Browser⁩

Caught exception:
Traceback (most recent call last):
  File "/home/user/.local/share/Anki2/addons21/874215009/advancedbrowser/core.py", line 94, in data
    return super(AdvancedDataModel, self).data(index, role)
  File "aqt/browser.py", line 145, in data
  File "/home/user/.local/share/Anki2/addons21/874215009/advancedbrowser/core.py", line 109, in columnData
    return self.browser.customTypes[type].onData(c, n, type)
  File "/home/user/.local/share/Anki2/addons21/874215009/advancedbrowser/custom_fields.py", line 161, in cPrevIvl
    return cs.time(-ivl)
  File "anki/stats.py", line 88, in time
AttributeError: 'CardStats' object has no attribute 'col'

The affected line return cs.time(-ivl) has been in AB since 2014, see commit. So the problem is that the add-on is not adjusted to a change in Anki that happened between 2.1.21 and 2.1.22.

ijgnd commented 2 years ago

no one reported this for over 2.5 years so there's no point in making an add-on version for 2.1.22

ijgnd commented 1 year ago

the ankiweb listing has been fixed in 2022-09 so that there's no AB version for 2.1.23 anymore. This is no longer relevant.