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

Unable to drag/drop/rename tags on Anki 2.1.24+ #15

Closed jeremyalexx closed 4 years ago

jeremyalexx commented 4 years ago

Which add-on is affected?

[BetterTags] Unable to drag/drop/rename with tags

Prerequisite checklist

What is the problem/feature you would like to see fixed/implemented?

Tag functionality is no longer working. Nothing implemented, just amended as unable to change tag names, locations or hierarchy.

How can we reproduce the problem?

As far as I am aware by following the below steps.

Modifying tags.

  1. [ First step ] Replicated issue by dragging one tag into another - this produced the error.
  2. [ Second step ]
  3. [ and so on... ]

Expected behavior: [ What you expected to happen ] I excepted to combine them and the "dragged tag" to become a subtag as per previous use with this addon.

Actual behavior: [ What actually happened ] ^^

Reproducible?: [ Can you reliably reproduce the issue by following the steps above? ] Yes. I have done a number of times. Error report is always the same.

Error An error occurred. Please start Anki while holding down the shift key, which will temporarily disable the add-ons you have installed. Debug info: Anki 2.1.28 (7d8818f8) Python 3.8.0 Qt 5.15.0 PyQt 5.15.0 Platform: Mac 10.15.6 Flags: frz=True ao=True sv=2 Add-ons, last update check: 2020-07-27 19:20:48 Add-ons possibly involved: ⁨BetterTags⁩

Caught exception: Traceback (most recent call last): File "aqt/webview.py", line 482, in handler File "aqt/editor.py", line 479, in File "/Users/alex/Library/Application Support/Anki2/addons21/bettertags/helpers.py", line 86, in sidebar.browser.editor.saveNow(lambda: callback(sidebar, *args, **kwargs)) File "/Users/alex/Library/Application Support/Anki2/addons21/bettertags/sidebar/view.py", line 482, in _repositionItems result = self._tagReplacer.reposition(source_tag, target_tag) File "/Users/alex/Library/Application Support/Anki2/addons21/bettertags/mediator.py", line 86, in reposition count = findReplaceTags(self._col, request) File "/Users/alex/Library/Application Support/Anki2/addons21/bettertags/tags.py", line 151, in findReplaceTags col.db.executemany( File "anki/dbproxy.py", line 93, in executemany File "anki/rsbackend.py", line 224, in db_execute_many File "anki/rsbackend.py", line 242, in _db_command anki.rsbackend.StringError: JSONError { info: "invalid type: map, expected a sequence" }

Version information

Anki Version 2.1.28 (7d8818f8) Python 3.8.0 Qt 5.15.0 PyQt 5.15.0

System

glutanimate commented 4 years ago

Hi Jeremy,

Thanks for the detailed report! That was very helpful. I've received a few reports about this now and am working on a fix. It should be ready later this week or early next week. Until then, please consider downgrading to Anki 2.1.26 if you can. Unfortunately the just released 2.1.28 has broken quite a few add-ons, and so 2.1.26 is the better choice at the moment in terms of add-on support.

I've written more about this over on the Patreon post, but to quote the important parts here (please make sure to read the section on how to downgrade especially):

I am working on a hotfix to make the add-on fully compatible with Anki 2.1.28, but until then my advice would be to downgrade to Anki 2.1.26 if you can (or remain on an earlier version if you are already on it). Anki 2.1.26 is marked as the current stable release, and you should be download it by clicking on the second blue button on the download page here. Quite a few other add-ons (both mine and from other authors) also seem to no longer work 2.1.28, so 2.1.26 seems like the better choice in terms of add-on support for now.

Important: If you do decide to switch back to 2.1.26, please make sure to downgrade your current collection first. To do so please go to the File>Switch Profile menu item, and click on “Downgrade & Quit”. If you skip this step, you may get an error message when opening your collection in an older Anki version, and you will need to return to this version, downgrade, then try again.

Sorry again about any inconvenience this might cause! I will be pushing the proper hotfix as soon as I can.

jeremyalexx commented 4 years ago

Thank you very much for your prompt and informative reply. No dramas here, I thought it best to just let you know! I will be in touch if I discover any other issues - but I assume a few are in the pipework given the recent update! All the best!

starwarsstan commented 4 years ago

This is still occurring with 2.1.31. only fix is closing the browser and then reopening, then the change is noted on the sidebar

glutanimate commented 4 years ago

Sorry for taking so long to get to this, guys. Finally had the time to look into things now.

@jeremyalexx: Please disregard my last reply. It looks like the issue you ran into with that error message is an earlier issue that's present with older versions of BetterTags on Anki 2.1.24 and up. If you install v1.0.4 which is available on Patreon right now, that should get rid of the error message. However, you will still run into the separate issue on 2.1.28 and up that @starwarsstan described (changes only being visible after restarting the browser)

@starwarsstan thanks for the report! Turns out that this ticket is about a different issue (that's been fixed in the current build), so I've gone ahead and created a separate ticket to keep track of the issue with changes not being visible in the sidebar: https://github.com/glutanimate/bettertags-public/issues/16 The good news is: I've fixed this in the current dev release, which should roll out to all Patreon users later this week.

If you guys feel adventurous, I'd love to get your eyes on the new build and see if everything's working fine for you. Feel free to send me a message on Patreon in that case and I'll be happy to send you the test build over!

My apologies again for all the delays and thanks so much for your patience!