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!

Initially, I was having problems saving the occluded card, and kept getting an error “first field is empty.” So I deleted the first field. Now it says it is incorrectly configured and I don’t know how to reconfigure it so it won’t have the second error anymore.

Thanks !!

I have 2 problems.One is when I copy an image to prepare the card, I have to click fit to canvas every time. I don’t want to do that. The second is every time I press space while studying an IO card, the image on the screen flickers, meaning that it disappears for less than a second and then reappears again. This is really annoying and tiring to the eye in the long run. Any help? (I’m using windows 10, and neither problem occurred before I moved my anki to a different drive and updated it)

Go here for the Image Occlusion support thread.

Concerning the flickering: Maybe you could try moving back the Anki folder to the other drive again (maybe your main drive?). The flickering you see is Anki loading the image. It seems that for some reason Anki now takes longer to load your picture. This might be because you moved Anki and its data to a drive which takes (even slightly) longer to load.

Yeah I moved it to an HDD previously. The problem is, I don’t think I will have the space necessary, especially in the future. Can I somehow install Anki on SSD and use HDD for storage so I will have space?If that’s not possible, if I could solve the problem as it stands right now, I would be much happier. Any advice on automatically fitting the image to canvas?
Edit:Ok I just checked and my current anki decks are in appdata roaming of my SSD. so how can flickering occur if my decks are already stored in my SSD?

Hi Glutanimate!

Thank you for this absolutely amazing add-on!!! Upped my learning effect by a bunch of levels.

To all my other Image Occlusion Enhanced lovers: The shortcut WIN + Shift + S lets you chose a rectangle of your screen to immediately copy it into your clipboard. If you open Image Occlusion Enhanced via Ctrl + Shift + O, you will find the screenshot directly on your flashcard.

I am a full on keyboard nerd as (I play the piano and some RTS games).

I would adore the feature if the button Toogle Masks on the back side of a card would be able to be pressed on by shortcut - for example via Ctrl + Space.

Best regards
Jakob

I don’t have the option to “hide one, reveal all” for Anki image occlusion enhanced?

Hi glutanimate!

First off, thank you for this amazing feature. Image occlusion is very helpful.

My midterms are in 4 days and I urgently need a solution for this problem: I watched the med school insider’s YouTube video on tips and tricks for image occlusion and saw that he had 3 options including the “hide one, reveal all” option that I do not have (I only have two options: “Hide All, Guess one” and “Hide One, Guess One”)… I made sure I added the code of the latest version of image occlusion enhanced and did this 5 times with the same results of not having the “hide one, reveal all” option that everyone else seems to have. I’m so stressed pls help!!! Thank you!!!