gregorias / anki-code-highlighter

Anki plugin for code syntax highlighting.
GNU Affero General Public License v3.0
54 stars 3 forks source link

Bug on startup #42

Closed domluther closed 1 year ago

domluther commented 1 year ago

I get this error message on start up. Disabling highlight code makes it go away.

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, repeat 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.58 (ab8b1465) Python 3.9.15 Qt 6.3.2 PyQt 6.3.1 Platform: macOS-13.1-arm64-arm-64bit Flags: frz=True ao=True sv=2 Add-ons, last update check: 2023-02-20 16:35:17 Add-ons possibly involved: ⁨Highlight Code⁩

Caught exception: Traceback (most recent call last): File "aqt.progress", line 118, in handler File "aqt.main", line 219, in on_window_init File "aqt.main", line 317, in setupProfile File "aqt.main", line 497, in loadProfile File "_aqt.hooks", line 3808, in call File "/Users/dom/Library/Application Support/Anki2/addons21/112228974/main.py", line 417, in load_mw_and_sync sync_assets( File "/Users/dom/Library/Application Support/Anki2/addons21/112228974/assets.py", line 210, in sync_assets asset_manager.delete_assets() File "/Users/dom/Library/Application Support/Anki2/addons21/112228974/assets.py", line 103, in delete_assets self.modify_templates(lambda tmpl: delete_import_statements( File "/Users/dom/Library/Application Support/Anki2/addons21/112228974/main.py", line 360, in transform_templates models.save(model) File "anki.models", line 559, in save File "anki.models", line 542, in update File "anki._backend_generated", line 872, in add_or_update_notetype File "anki._backend", line 156, in _run_command anki.errors.CardTypeError: Card template ⁨1⁩ in notetype '⁨Final 2. Picture Words⁩' has a problem.
Expected to find a field replacement on the front of the card template.

gregorias commented 1 year ago

One other user had a similar problem and discovered that their note type was broken, https://github.com/gregorias/anki-code-highlighter/issues/36. Could you check if that's the case for you?

gregorias commented 1 year ago

Closing due to lack of response.