Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

anki.errors.NotFoundError/KeyError #39

Open
5 of 6 tasks
klieret opened this issue Aug 21, 2022 · 0 comments
Open
5 of 6 tasks

anki.errors.NotFoundError/KeyError #39

klieret opened this issue Aug 21, 2022 · 0 comments
Labels
bug Something isn't working

Comments

@klieret
Copy link

klieret commented Aug 21, 2022

Problem description

Got the following exception (it disappeared after restarting and everything works, this is just FYI):

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 to the add-on author.
Debug info:
Anki 2.1.54 (b6a7760c) Python 3.9.7 Qt 6.3.1 PyQt 6.3.1
Platform: Mac 12.4
Flags: frz=True ao=True sv=2
Add-ons, last update check: 2022-08-21 11:07:01
Add-ons possibly involved: ⁨Syntax Highlighting for Code⁩

Caught exception:
Traceback (most recent call last):
  File "anki.config", line 43, in get_immutable
  File "anki._backend.generated", line 1004, in get_config_json
  File "anki._backend", line 146, in _run_command
anki.errors.NotFoundError

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "aqt.main", line 1135, in onAddCard
  File "aqt", line 129, in open
  File "aqt.addcards", line 49, in __init__
  File "aqt.addcards", line 74, in setupEditor
  File "decorator", line 232, in fun
  File "anki.hooks", line 89, in decorator_wrapper
  File "anki.hooks", line 80, in repl
  File "aqt.editor", line 128, in __init__
  File "aqt.editor", line 179, in setupWeb
  File "anki.hooks", line 45, in runFilter
  File "/Users/fuchur/Library/Application Support/Anki2/addons21/1463041493/main.py", line 319, in onSetupButtons21
    previous_lang = get_default_lang(mw)
  File "/Users/fuchur/Library/Application Support/Anki2/addons21/1463041493/main.py", line 84, in get_default_lang
    addon_conf = mw.col.conf['syntax_highlighting_conf']
  File "anki.config", line 62, in __getitem__
  File "anki.config", line 45, in get_immutable
KeyError

Checklist

Please replace the space inside the brackets with an x if the following items apply:

  • I've restarted Anki to see if it helps --> Does help!
  • I've verified that I use the latest version of the add-on by redownloading it from AnkiWeb
  • I've verified that I use the latest version of Anki by checking at https://apps.ankiweb.net#download
  • I've tried to disable other add-ons to see if there are any interactions present
  • My issue disappears when I hold shift while starting Anki.
  • I've checked if anyone else reported this problem before by looking through the issue reports. I also checked to see if there is a section about known issues in the add-on description, documentation, or README.

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):

    
    Anki 2.1.54 (b6a7760c) Python 3.9.7 Qt 6.3.1 PyQt 6.3.1
    Platform: Mac 12.4
    Flags: frz=True ao=True sv=2
    Add-ons, last update check: 2022-08-21 11:07:01
    
    
    ===Add-ons (active)===
    (add-on provided name [Add-on folder, installed at, version, is config changed])
    Syntax Highlighting for Code ['1463041493', 2018-10-06T21:31, 'None', '']
    
    ===IDs of active AnkiWeb add-ons===
    1463041493
    
    ===Add-ons (inactive)===
    (add-on provided name [Add-on folder, installed at, version, is config changed])
    

Please fill in details about your operating system (Windows/macOS/Linux, which version):

  • OS: MacOS M1
  • version: 12.4

Please open Anki, go to Tools → Add-ons, take a screenshot of your installed add-ons, and paste it below:

Error message (if any)

See above

@klieret klieret added the bug Something isn't working label Aug 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant