Anki Forums

Image Occlusion Enhanced [Official Support Thread]

This is the new official support thread for Image Occlusion Enhanced. The previous thread may be found here. From now on please direct all of your general support questions about the add-on here.

Note: If you’ve run into a bug, please consider filing a bug report instead. The issue tracker takes care of a lot of the troubleshooting groundwork, so it really makes it a lot easier for me to fix your issue. Should you be unfamiliar with how to file a bug report, then please check out my quick tutorial here.

If you are unable to file a bug report through the issue tracker, then please make sure to copy the bug report template below, paste it into your reply, and fill it out. This will go a long way towards me and other users being able to understand what’s wrong and help you.

In important cases you can also reach out to me directly via an email to :email: ankiglutanimate@gmail.com


Thank you!

1 Like

In cases where you can’t use the official issue tracker, please copy the bug report template below into your reply and fill it out. This will go a long way towards me and other users being able to understand what’s wrong and help you. Thank you!

Problem description

Please describe the issue concisely in here. In case of an error: Walk us through the steps you took to get there. What happened? What did you expect to happen?

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
  • [ ] 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 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):


Error message (if any)

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


Hi there, firstly I’d like to thank you for such a great contribution to Anki.

I am a trying to make a series of image occlusion flashcards, and after making some successfully, I encouter this error:

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.26 (70784154) Python 3.8.0 Qt 5.14.1 PyQt 5.14.1
Platform: Windows 10
Flags: frz=True ao=True sv=1
Add-ons, last update check: 2020-07-11 14:09:19

Caught exception:
Traceback (most recent call last):
File “aqt\webview.py”, line 464, in handler
File “C:\Users\chouf\AppData\Roaming\Anki2\addons21\1374772155\add.py”, line 278, in
lambda val, choice=choice, close=close: self._onAddNotesButton(choice, close, val))
File “C:\Users\chouf\AppData\Roaming\Anki2\addons21\1374772155\add.py”, line 293, in _onAddNotesButton
r = gen.generateNotes()
File “C:\Users\chouf\AppData\Roaming\Anki2\addons21\1374772155\ngen.py”, line 80, in generateNotes
(svg_node, layer_node) = self._getMnodesAndSetIds()
File “C:\Users\chouf\AppData\Roaming\Anki2\addons21\1374772155\ngen.py”, line 190, in _getMnodesAndSetIds
mask_doc = minidom.parseString(self.new_svg.encode(‘utf-8’))
AttributeError: ‘NoneType’ object has no attribute ‘encode’

Also, regarding prior cards made with image occlusion, when trying to edit them I get the error message: EDITING UNAVAILABLE: Invalid image occlusion note ID.

Sorry for the long post but I am working on a project for my department and would like to solve this ASAP before I present it to the director,

Thanks!

Problem description

I downloaded the Image Occlusion add-on. Then, I had some issues with configuration due to deleting some of the fields accidentally. Finally got that to work. Now, when I occlude an image and it adds the cards, the answer (image with no occlusions) is the question. The answer is the occluded image.

Checklist

  • I’ve restarted Anki to see if it helps
  • 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
  • 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 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.30 (06a69c25) Python 3.8.0 Qt 5.14.1 PyQt 5.14.1
    Platform: Windows 10
    Flags: frz=True ao=False sv=1
    Add-ons, last update check: 2020-08-13 22:02:30
    
    
    ===Add-ons (active)===
    (add-on provided name [Add-on folder, installed at, version, is config changed])
    Image Occlusion Enhanced for Anki 21 alpha ['1374772155', 2020-04-27T21:21, 'None', '']
    
    ===IDs of active AnkiWeb add-ons===
    1374772155
    
    ===Add-ons (inactive)===
    (add-on provided name [Add-on folder, installed at, version, is config changed])
    

Error message (if any)

When I tried to flip the cards, it says, “Anki couldn’t find the line between the question and answer. Please adjust the template manually to switch the question and answer.”

front template says:
{{#Image}}

{{Image}}

{{/Image}}

back template:
{{#Image}}

{{Answer Mask}}

{{Image}}

Toggle Masks

  <div class="io-extra-entry">
    <div class="io-field-descr">Remarks</div>
  </div>


  <div class="io-extra-entry">
    <div class="io-field-descr">Sources</div>
  </div>


  <div class="io-extra-entry">
    <div class="io-field-descr">Extra 1</div>
  </div>


  <div class="io-extra-entry">
    <div class="io-field-descr">Extra 2</div>
  </div>

{{/Image}}

Please find the “Image Occlusion Enhanced” note type under Tools → Manage Note Types, rename it to “Image Occlusion Enhanced Backup”, and then restart Anki. This will prompt the add-on to regenerate the default note type, which should fix the note type and templates

Unfortunately I can’t provide support for custom note types / templates at the moment, as looking into what went wrong on a case-by-case basis would take up too much time. However, if you play around with this a bit and compare the original note type & templates under “Image Occlusion Enhanced” with your changes under “Image Occlusion Enhanced Backup”, I’m optimistic you can fix the issue.


(@dae could you merge this thread into Image Occlusion Enhanced [Official Support Thread] please? [if that’s possible, not sure how Discourse does things])

1 Like

I want to cry. Thank you so much.
I spent hours trying different things and watching tutorials last night before I decided to post here.

1 Like

Hello,
First of all thanks for your addon, it’s a great one.
I’m studying for a big med exam and I made cards with a lot of textbook pictures (full text).
Do you know how I could edit an image in the back of the card without making any new card ?
I want to highlight some parts of the answer. It’s really a big problem for me and I looked a lot for answers so if you could help be that would be awesome.
Thanks !

Add Mode starts off-center. It opens around the top-left of the image. I’m not sure if this is intended behavior.

Is there a way to make it so that I would not have to scroll (or fit image to canvas) every time to get to the center of the picture? And instead, it would just open the image already centered.

I’m trying to make a bunch of flashcards and the added steps (pressing F and waiting for the computer to center the image, the computer is old so it takes some time) is making it take a little too much time.

Thank you for your time.

hello,
thank you for this amazing add-on!
I started using image occlusion a while ago and it was working great, and then a two days ago it just stopped loading the photo I choose.
I tried restarting anki, then restarting wo the add on, then with. I also checked for updates but there were none.


this is how it would look like^^
if anyone could please help it would be much appreciated!