gflohr / anki-chess-opening-trainer

Anki add-on for training chess openings
Other
6 stars 0 forks source link

Add-on crashes with deleted decks #15

Closed gflohr closed 2 months ago

gflohr commented 2 months ago

No media files. The deck names contain spaces.

See backup backup-2024-07-03-09.16.34.colpkg.

Anki 24.06.2 (33a92379)  (ao)
Python 3.9.18 Qt 6.6.2 PyQt 6.6.1
Platform: macOS-14.5-x86_64-i386-64bit

Traceback (most recent call last):
  File "/Users/me/Library/Application Support/Anki2/addons21/705507113/__init__.py", line 29, in show_import_dialog
    dlg = ImportDialog()
  File "/Users/me/Library/Application Support/Anki2/addons21/705507113/dialog.py", line 104, in __init__
    self._fill_dialog()
  File "/Users/me/Library/Application Support/Anki2/addons21/705507113/dialog.py", line 174, in _fill_dialog
    if deck['name'] == self.deck_combo.itemText(i):
TypeError: 'NoneType' object is not subscriptable

===Add-ons (active)===
(add-on provided name [Add-on folder, installed at, version, is config changed])
Chess Opening Trainer ['705507113', 2024-06-11T23:40, 'None', mod]

===IDs of active AnkiWeb add-ons===
705507113
gflohr commented 2 months ago

The problem occurs, when the configuration contains deck ids of decks that have been deleted in the meantime.

gflohr commented 2 months ago

Fixed.