Fix Beautify Anki in latest Anki version (2.1.49) #59
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I have tried fix the add-on by simply spotting what part of the code was crashing and fixing it accordingly. I could trigger 3 different crashes and they were fixed in the following ways:
Overall, these are very hacky fixes because in ankitects/anki@e568525 most of the logic that this add-on uses was rewritten so to fix the add-on further a complete rewrite would be required. It might be that there are more crashes which this fix does not cover since I was the only tester.
Tested locally on Windows 10, Anki 2.1.49.
PS: Thanks to @datphan310 for the reviewer.py fix. Before I was just naively commenting the code.