glutanimate / bettertags-public

Temporary repository to host bug reports and documentation for the BetterTags Anki add-on
https://www.patreon.com/glutanimate/posts?tag=BetterTags
5 stars 0 forks source link

'SidebarItem' object has no attribute 'data' after deleting tag #9

Closed DoctorToBeIn23 closed 4 years ago

DoctorToBeIn23 commented 4 years ago

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.20 (47a1bf8b) Python 3.8.0 Qt 5.13.1 PyQt 5.14.1 Platform: Mac 10.15.3 Flags: frz=True ao=True sv=1 Add-ons, last update check: 2020-03-14 10:09:24 Add-ons possibly involved: BetterTags

Caught exception: Traceback (most recent call last): File "aqt/webview.py", line 368, in handler File "aqt/editor.py", line 443, in File "/Users/Jacob/Library/Application Support/Anki2/addons21/bettertags/helpers.py", line 86, in sidebar.browser.editor.saveNow(lambda: callback(sidebar, *args, **kwargs)) File "/Users/Jacob/Library/Application Support/Anki2/addons21/bettertags/sidebar/view.py", line 419, in _deleteItems select_after = "" if not neighbor else neighbor.data or "" AttributeError: 'SidebarItem' object has no attribute 'data'

DoctorToBeIn23 commented 4 years ago
Anki 2.1.20 (47a1bf8b) Python 3.8.0 Qt 5.13.1 PyQt 5.14.1
Platform: Mac 10.15.3
Flags: frz=True ao=True sv=1
Add-ons, last update check: 2020-03-14 10:09:24

===Add-ons (active)===
(add-on provided name [Add-on folder, installed at, version, is config changed])
'' ['ResetEZ', 0, 'None', '']
'' ['popup_dictionary', 0, 'None', mod]
'' ['review_heatmap', 0, 'None', '']
AMBOSS add-on ['0amboss_addon', 2019-10-21T05:12, 'None', '']
Add Hyperlink ['318752047', 2019-11-24T18:30, 'None', '']
Advanced Browser ['874215009', 2020-02-20T15:39, 'None', '']
Advanced Copy Fields ['1898445115', 2019-09-02T12:18, 'None', '']
Anki Zoom ['538879081', 2020-03-08T00:31, 'v1.1', mod]
Batch Editing ['291119185', 2019-07-25T17:21, 'None', '']
BetterTags ['bettertags', 2020-01-28T13:30, 'None', mod]
Browser Resizer ['1435775540', 2020-02-08T13:09, 'None', mod]
Browser Search Box Quick Insert Tag Deck Notetype ['1052724801', 2020-01-24T09:41, 'None', '']
Browser TableEditor side-by-side horizontal split ['831846358', 2020-01-24T09:41, 'None', mod]
Convert Subdecks to Tag Hierarchy ['Convert_Subdecks_to_Tags', 0, 'None', '']
Correct Answers Graph ['993120073', 2020-01-24T09:41, 'None', '']
Create Filtered Deck from the Browser ['861263371', 2019-05-04T20:21, 'None', '']
Customize Keyboard Shortcuts ['24411424', 2020-03-10T23:05, 'None', mod]
Customize Sidebar ['1988760596', 2020-01-23T19:18, 'None', '']
Ease Factor Histogram ['494944895', 2019-07-28T11:40, 'None', '']
Edit Field During Review Cloze ['385888438', 2020-03-05T21:25, 'None', '']
Extended Tag AddEdit Dialog ['1135507717', 2020-02-19T07:13, 'None', '']
Fastbar- with nightmode support ['46611790', 2020-03-09T14:47, 'None', '']
Five Finger Silver New Answer Button Graph ReLrn Stats ReMemorize Plan9-0 ['2047355215', 2019-11-26T12:48, 'None', '']
Free Weekend - or Any Other Day ['742185195', 2020-01-24T08:34, 'None', mod]
Frozen Fields ['516643804', 2020-02-29T21:12, 'None', '']
Full Screen Toggle ['1612375712', 2019-05-06T13:49, 'None', '']
High Yield Tags ['1918380616', 2020-03-10T17:11, 'None', mod]
Highlight Search Results in the Browser ['225180905', 2020-01-21T20:28, 'None', '']
Hint Hotkeys ['1844908621', 2019-05-04T20:17, 'None', '']
Image Occlusion Enhanced for Anki 21 alpha ['1374772155', 2019-11-24T18:30, 'None', '']
Improved Quizlet to Anki 21 Importer ['538351043', 2020-02-24T17:00, 'None', '']
Keep card displayed in reviewer until it is modified ['1894745652', 2020-01-23T18:22, 'None', '']
Keep model of add cards ['424778276', 2019-03-22T07:07, 'None', '']
Learning Step and Review Interval Retention ['1949865265', 2020-02-08T11:12, 'None', '']
Long term backups ['529955533', 2019-07-07T20:37, 'None', '']
Maximum image height and width in card editor ['229181581', 2020-02-20T01:10, 'None', '']
More Decks Stats and Time Left ['1556734708', 2020-01-24T09:41, 'None', mod]
More Overview Stats 21 ['738807903', 2019-05-10T12:47, 'None', '']
Opening the same window multiple time ['354407385', 2020-03-09T05:57, 'None', '']
PDF Glossary Exporter ['pdf_glossary', 2019-08-19T06:35, 'None', '']
Postpone cards review ['1152543397', 2020-03-09T05:26, 'None', '']
Pretzel Logic Retention Benchmarking ['1168065472', 2020-01-24T09:41, 'None', '']
Progress Graphs and Stats for Learned and Matured Cards ['266436365', 2019-09-01T11:56, 'None', '']
Puppy Reinforcement ['1722658993', 2020-03-02T13:23, 'None', '']
Quick Field Navigation ['734297936', 2020-01-02T11:58, 'None', '']
Quick tagging 21 ['304770511', 2020-02-10T23:17, 'None', mod]
ReMemorize Rescheduler with sibling and logging v130 ['323586997', 2020-02-03T13:25, 'None', mod]
Rebuild All  Empty All for Anki 21 ['1810938259', 2018-07-19T22:40, 'None', '']
Remaining time for Anki 21 ['1508357010', 2020-03-12T04:59, 'None', '']
Special Fields ['1102281552', 2020-03-02T03:07, 'None', mod]
Speed Focus Mode auto-alert auto-reveal auto-fail ['speedfocus_AnKing', 2019-05-02T08:55, 'None', '']
Spell Checker ['spell_checker', 0, 'None', '']
Straight Reward ['957961234', 2020-03-11T20:49, 'None', mod]
Syllabus - Anki Statistics and Export by Tag and Deck ['668156440', 2020-01-24T09:41, 'None', mod]
Symbols ['1461102936', 2019-05-29T11:08, 'None', mod]
The KING of Button Add-ons ['374005964', 2020-03-12T08:29, 'None', mod]
Web Browser - Search terms Import texts and images automatically ['864545277', 2020-01-24T09:41, 'None', mod]
add-on dialog searchfilter bar ['561945101', 2020-01-21T15:42, 'None', '']
deck and card info sidebar during review ['673114053', 2020-02-19T16:44, 'None', mod]
porting_clickable_tags ['porting_clickable_tags', 0, 'None', '']
put ALL due learning cards first fork for 21 ['1117177241', 2019-08-29T09:12, 'None', '']
when is next learning card due today due ['563204849', 2019-12-22T21:49, 'None', '']

===IDs of active AnkiWeb add-ons===
1052724801 1102281552 1117177241 1135507717 1152543397 1168065472 1374772155 1435775540 1461102936 1508357010 1556734708 1612375712 1722658993 1810938259 1844908621 1894745652 1898445115 1918380616 1949865265 1988760596 2047355215 225180905 229181581 24411424 266436365 291119185 304770511 318752047 323586997 354407385 374005964 385888438 424778276 46611790 494944895 516643804 529955533 538351043 538879081 561945101 563204849 668156440 673114053 734297936 738807903 742185195 831846358 861263371 864545277 874215009 957961234 993120073

===Add-ons (inactive)===
(add-on provided name [Add-on folder, installed at, version, is config changed])
Resize images in editor ['1103084694', 2020-02-27T02:11, 'None', mod]
glutanimate commented 4 years ago

Thanks! Did the error just pop up once or have you found a way to reliably reproduce it? If so, does disabling the following add-ons help?:

From a quick glance these are the add-ons that could interfere at the sidebar level.

DoctorToBeIn23 commented 4 years ago

It has come up a few times mainly when I have tried to delete multiple tags at a time... I cannot get it to do it each time. What do you want me to do?

glutanimate commented 4 years ago

What would be super helpful, if you have the time, is if you could create a separate profile to experiment on, and then try to see if you can find a reproducible series of steps that always generate the error while deleting tags. Once we have that, you could attempt to disable the add-ons mentioned above to isolate whether this is an issue with add-on interference or something else.

Unfortunately this is the first time I'm seeing this issue, so we have to dig a bit deeper to find out what exactly prompts it to appear.

glutanimate commented 4 years ago

OK, playing around with this, I think I found a way to reliably trigger the issue:

  1. Have Customize Sidebar installed and active
  2. Delete a tag that's right beneath the Note Types section (or any other section modified by Customize Sidebar)

I will look into a workaround, but for the time being if this is impeding your workflow you could temporarily disable Customize Sidebar.

If you send me your Patreon name or email via Reddit, I will send you the test release with the fix as soon as I've got it ready.

DoctorToBeIn23 commented 4 years ago

Thanks man! Sorry but to be 100% honest I normally subscribe to be your Patreon when you have a new add on or a big update and then I cancel at the end of the month... :P I was one last month haha

glutanimate commented 4 years ago

Hey man,

Sorry for taking so long to respond. The past few weeks have been a bit crazy (well, who haven't they been crazy for, right?).

In any case, I just wanted to let you know that a fix for this is now ready and will ship with the upcoming v1.0.4 bugfix release which should be coming out over the next few days. Thanks again for your help in tracking this down. It's much appreciated!

And no worries about cancelling / resubbing, I understand that times are tough, and I really appreciate your support either way. Thanks again!