Closed gustavosmendes closed 2 years ago
Also, fix the description of the addon.
Initially says it doesn't work on 2.1.26+ and the changelog says the opposite
Same problem.
Thanks for reporting here, I fixed the description. Does the error show up with other note types too or just with Enhanced Cloze v2 and the one from Anking?
It would be helpful if you could post the contents of the Styling field in the card type editor of the card types it happens with.
I Will check it later :)
Tried with all addons disabled. Almost every note type the message appeared, BUUUUT... I found the main reason for conflict.
When you use https://ankiweb.net/shared/info/1899278645, it adds this "@import url("_editor_button_styles.css");" to styling. When deleted, the addon does not send an error message. However, I haven't tested other features of your addon.
If you delete the part of the styling, it seems to works fine.
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. Debug info: Anki 2.1.48 (af2ec0b9) Python 3.8.6 Qt 5.14.2 PyQt 5.14.2 Platform: Windows 10 Flags: frz=True ao=True sv=3 Add-ons, last update check: 2021-09-19 10:49:16
Caught exception: Traceback (most recent call last): File "C:\Users\gusta\AppData\Roaming\Anki2\addons21\1625103157\Buttons.py", line 246, in advancedEditorButtonAction a.loadUI(self.clayout) File "C:\Users\gusta\AppData\Roaming\Anki2\addons21\1625103157\AdvancedStylerGui.py", line 65, in loadUI self.loadSettingsFromCss(text) File "C:\Users\gusta\AppData\Roaming\Anki2\addons21\1625103157\AdvancedStylerGui.py", line 132, in loadSettingsFromCss self.profile.initializeFromCssString(filePath, "Custom") File "C:\Users\gusta\AppData\Roaming\Anki2\addons21\1625103157\CssProfile.py", line 47, in initializeFromCssString self.rootList = createRootListFromCssString(cssString) File "C:\Users\gusta\AppData\Roaming\Anki2\addons21\1625103157\myCssParser.py", line 64, in createRootListFromCssString newDict = convertRuleContentToOrderedDict(rule.content) File "C:\Users\gusta\AppData\Roaming\Anki2\addons21\1625103157\myCssParser.py", line 99, in convertRuleContentToOrderedDict orderdRule[dec.name] = str(serialize(dec.value)).strip(' ') AttributeError: 'ParseError' object has no attribute 'value' . On AnKing, the addon does not work properly. Looks like it needs an initial value to work.
Uploaded a fix for the Advanced Styles incompatibility to AnkiWeb. Thanks for the hint with the "@import url("_editor_button_styles.css");" statement!
@RisingOrange I still have some errors. Please check with others if there are any errors in the anking card. I'll check if there is any conflict with another addon.
You mean the Anking Cloze template right? I didn't get any errors with it. Can you send me the styling information from the Styling field in the editor?
Sure. I'll send it by email, okay?
Ok I won't have time to have a look at it immediately though
This issue doesn't occur with the updated AnKing notetypes anymore. They previous versions contained a syntax error in the css which caused this.
Problem description
I opened the card style via enhanced cloze v2 or from AnKing and the error appeared.
Checklist
Please replace the space inside the brackets with an x if the following items apply:
Information about your Anki set-up
Please fill out the section corresponding with your Anki version:
If you are using Anki 2.1
Please open Anki, go to Help → About, click on "Copy Debug Info", and paste the result between the backticks below (if the button does not appear you are using an older version of Anki 2.1 and will need to update first):
If you are using Anki 2.0
Please open Anki, go to Help → About, find the two lines starting with
Version:
andQt
, and copy-paste them between the backticks below:Please fill in details about your operating system (Windows/macOS/Linux, which version):
Please open Anki, go to Tools → Add-ons, take a screenshot of your installed add-ons, and paste it below:
Error message (if any)
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. Debug info: Anki 2.1.48 (af2ec0b9) Python 3.8.6 Qt 5.14.2 PyQt 5.14.2 Platform: Windows 10 Flags: frz=True ao=True sv=3 Add-ons, last update check: 2021-09-19 10:49:16
Caught exception: Traceback (most recent call last): File "C:\Users\gusta\AppData\Roaming\Anki2\addons21\1625103157\Buttons.py", line 246, in advancedEditorButtonAction a.loadUI(self.clayout) File "C:\Users\gusta\AppData\Roaming\Anki2\addons21\1625103157\AdvancedStylerGui.py", line 65, in loadUI self.loadSettingsFromCss(text) File "C:\Users\gusta\AppData\Roaming\Anki2\addons21\1625103157\AdvancedStylerGui.py", line 132, in loadSettingsFromCss self.profile.initializeFromCssString(filePath, "Custom") File "C:\Users\gusta\AppData\Roaming\Anki2\addons21\1625103157\CssProfile.py", line 47, in initializeFromCssString self.rootList = createRootListFromCssString(cssString) File "C:\Users\gusta\AppData\Roaming\Anki2\addons21\1625103157\myCssParser.py", line 64, in createRootListFromCssString newDict = convertRuleContentToOrderedDict(rule.content) File "C:\Users\gusta\AppData\Roaming\Anki2\addons21\1625103157\myCssParser.py", line 89, in convertRuleContentToOrderedDict a = parse_declaration_list(ruleContent, skip_comments=True, skip_whitespace=True) File "C:\Users\gusta\AppData\Roaming\Anki2\addons21\1625103157\tinycss2\parser.py", line 172, in parse_declaration_list tokens = _to_token_iterator(input, skip_comments) File "C:\Users\gusta\AppData\Roaming\Anki2\addons21\1625103157\tinycss2\parser.py", line 17, in _to_token_iterator return iter(input) TypeError: 'NoneType' object is not iterable