glutanimate / image-occlusion-enhanced

Anki add-on that transforms images into cloze tests
https://ankiweb.net/shared/info/1374772155
Other
396 stars 41 forks source link

Add image occlusion button doesn't work #168

Open butterd-toast opened 4 years ago

butterd-toast commented 4 years ago

Problem description

I have an image saved to the clipboard but when I click on the "Add Image Occlusion" button, I get the following error which I included below.

I have also tried pasting the image in the "Image" field and then clicking on the Add Image Occlusion button but I still get the same error. When I restart Anki with the shift button pressed, the image occlusion add on that was preloaded with Anki 2.1 is still there but the Add Image Occlusion button has disappeared. I also get the same error if I attach pictures from a save file.

Thank you and I hope this is fixed soon, I miss using Image Occlusion! Thanks for your hard work Glutaminate.

Checklist

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

Information about your Anki set-up

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.28 (7d8818f8) Python 3.8.0 Qt 5.15.0 PyQt 5.15.0
Platform: Mac 10.14.6
Flags: frz=True ao=True sv=1
Add-ons, last update check: 2020-08-11 00:02:59
Add-ons possibly involved: ⁨Image Occlusion Enhanced for Anki 21 alpha, Frozen Fields⁩

Error message (if any)

If you've received an error message, please copy and paste it between the backticks below:

Caught exception:
Traceback (most recent call last):
  File "anki/config.py", line 35, in get_immutable
  File "anki/rsbackend_gen.py", line 570, in get_config_json
  File "anki/rsbackend.py", line 265, in _run_command
anki.rsbackend.NotFoundError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "aqt/webview.py", line 35, in cmd
  File "aqt/webview.py", line 121, in _onCmd
  File "aqt/webview.py", line 536, in _onBridgeCmd
  File "</Applications/Anki.app/Contents/MacOS/decorator.pyc:decorator-gen-8>", line 2, in onBridgeCmd
  File "anki/hooks.py", line 638, in decorator_wrapper
  File "anki/hooks.py", line 635, in repl
  File "/Users/gemmacampos/Library/Application Support/Anki2/addons21/516643804/main.py", line 135, in onBridge
    return _old(self, str)
  File "aqt/editor.py", line 412, in onBridgeCmd
  File "/Users/gemmacampos/Library/Application Support/Anki2/addons21/1374772155/main.py", line 101, in <lambda>
    lambda o=editor: onImgOccButton(o),
  File "/Users/gemmacampos/Library/Application Support/Anki2/addons21/1374772155/main.py", line 61, in onImgOccButton
    io_model = getOrCreateModel()
  File "/Users/gemmacampos/Library/Application Support/Anki2/addons21/1374772155/config.py", line 121, in getOrCreateModel
    model_version = mw.col.conf['imgocc']['version']
  File "anki/config.py", line 49, in __getitem__
  File "anki/config.py", line 37, in get_immutable
KeyError
butterd-toast commented 4 years ago

**glutanimate

sorry hehe fingers slipped

candy333333333333 commented 4 years ago

I am having the same problem. Sometimes Anki lets me work around it by just clicking the check for updates button on the image occlusion, but now it isn't doing that :( Its a major anatomy week, so this is killing me. Same error message as above and all the same steps have been taken to resolve the issue.