Skip to content

Troubleshooting

Glutanimate edited this page Sep 22, 2016 · 21 revisions

General information

Basic troubleshooting procedure

Before reporting an issue on GitHub or the Anki support forums please check if any of the following steps fixes your problem:

  1. Restart Anki
  2. Try out a different image file
  3. Reinstall Image Occlusion Enhanced. This will update the add-on to the latest version.
  4. Only if you've modified your IO note type, i.e. the fields or the card template: Reset them to the defaults (see below)

Resetting note type and template to the defaults

Note type

To restore the original note type please do the following:

  1. Go to ToolsManage Note Types
  2. Select the Image Q/A - 2.0 Enhanced entry
  3. Click on Fields
  4. Add, Delete, or Rename the listed field entries in order to restore the following list of default fields:
Question
Answer
SVG
Original Image
Header
Footer
Remarks
Sources
TempField3
TempField4
TempField5

In some instances resetting the note type might not work due to a corrupted database. If this is the case you will usually see an error message as soon as you try to edit the field list. Your only option to fix this lies in performing a database check via ToolsCheck Database. Warning: this will remove all Image Occlusion notes you've created since modifying your IO note type. Having performed the check, you might still be left with some empty cards in your decks. To remove these go to ToolsEmpty cards. You should now be able to restore your IO note type by following steps 1-4 above.

Card template

To restore the original card template please do the following:

  1. Go to ToolsManage Note Types
  2. Select the Image Q/A - 2.0 Enhanced entry
  3. Click on Cards
  4. If you are having trouble with extra cards being generated: There should only be one Tab at top called Image Q/A. If there is more than one Tab please close the other ones by clicking on the X. This will remove all extraneous cards you might have added by accident.
  5. If you are having trouble with your cards always ending up in one deck: Click on More and make sure that it says Deck override (off) in the menu. If the override is on you will have to click on that menu option and clear out the deck name in the window that appears subsequently.
  6. If you are having trouble with your card formatting: Please fully restore the card template by copying and pasting the snippets below into the respective template fields.

Default Front Template:

{{#Original Image}}
<div id="io-title">{{Header}}</div>
<div id="io-wrapper">
  <div id="io-overlay">{{Question}}</div>
  <div id="io-original">{{Original Image}}</div>
</div>
<div id="io-footer">{{Footer}}</div>
{{/Original Image}}

Default Styling:

.card {
  font-family: "Helvetica LT Std", Helvetica, Arial, Sans;
  font-size: 150%;
  text-align: center;
  color: black;
  background-color: white;
}

.io-field-descr{
  font-weight: bold;
}

#io-title{
  font-size: 1.1em;
}

#io-wrapper {
  position:relative;
  width: 100%;
}

#io-overlay {
  position:absolute;
  top:0;
  width:100%;
  z-index:3
}

#io-original {
  position:relative;
  top:0;
  width:100%;
  z-index:2
}

#io-question{
  margin-top: 0.8em;
}

#io-footer{
  margin-top: 0.8em;
  max-width: 80%;
  margin-left: auto;
  margin-right: auto;
}

Default Back Template:

{{#Original Image}}
<div id="io-title">{{Header}}</div>
<div id="io-wrapper">
  <div id="io-overlay">{{Answer}}</div>
  <div id="io-original">{{Original Image}}</div>
</div>
<div id="io-footer">
  {{#Footer}}
    <div>{{Footer}}</div>
    <hr>
  {{/Footer}}
  {{#Remarks}}
    <div>
      <span class="io-field-descr">Remarks: </span>{{Remarks}}
    </div>
  {{/Remarks}}
    </br>
  {{#Sources}}
    <div>
      <span class="io-field-descr">Sources: </span>{{Sources}}
    </div>
  {{/Sources}}
</div>
{{/Original Image}}

If you've renamed any of the fields listed in the note template you will have to change the field names accordingly in the Front and Back templates above.

Specific issues

Answers flash for a half a second when reviewing cards

Known issue on macOS. No workaround so far, I'm afraid.

Issue link

The Masks Editor is very glitchy for me

Another macOS issue. Sorry, but as with the previous issue the problem lies deeper than Image Occlusion or even Anki itself. So no fix so far.

An Error message appears whenever I try to review Image Occlusion cards or look at them in the Browser

Probably an issue with your local Image Occlusion note type. Please try restoring it to the defaults. Following that, please read this and update Image Occlusion Enhanced to the latest release. More recent versions of the add-on prevent you from creating new IO notes if your note type is misconfigured.

Forum link

The Masks Editor won't appear

If you're using Windows this might be because of special characters in your Windows user name. Some users have been able to fix this succesfully by changing their Anki profile location and/or switching to a different Windows user name:

https://anki.tenderapp.com/discussions/add-ons/7636-image-occlusion

https://anki.tenderapp.com/discussions/add-ons/7714-image-occlusion-unicode-warning

If your user name doesn't contain any special characters you might just have to rename the file and or move it to a different directory, as outlined in the next issue.

Issue link

I get an 'Unicode' or 'filename syntax' error message when opening an image

Your image likely contains special characters that cause issues when using IO on Windows. Please try renaming your file and/or moving it to a directory that doesn't contain any special characters in its path.

Issue link

Can't open GIFs in Image Occlusion

GIFs currently aren't supported on macOS and Windows.

Issue link

The color options don't seem to be working

This is a known issue. As a workaround please restart Anki after changing any preferences in the Options dialog.

Issue link 1, Issue link 2

The add-on creates more cards than it should

This could be because of two things:

  1. You modified the Image Occlusion note type by accident, adding an empty card to the note. If so please refer to Card template.

  2. You're drawing small additional shapes without noticing. This can happen sometimes as the editor is a bit over-sensitive when it comes to registering user input.

    If you suspect that this is the case, try clicking on the grey background after you've drawn your occlusions. Then either use 'A' to highlight all shapes or 'Tab' to iterate through them. This should help you find accidental occlusions if there are any. Switching off the image layer in the layers sidebar on the right and zooming in slightly might make it easier to see them. Delete the additional shapes and the add-on should create the correct number of cards.

Some of my Image Occlusion cards are empty

Please see above.

My custom labels and background shapes don't seem to be working

Please make sure to use the Labels layer when adding custom labels or other elements to the background picture. Anything you draw on the Picture layer will get removed. Please see here for more information: Using the layers dialog to create custom labels

My Image Occlusion cards always end up in the wrong deck

The add-on will automatically try to use your last-used deck (the one you last added notes to). If you want to change the target deck you will have to use the deck selection button on the Fields Tab of the IO Editor (not the one in Anki's regular Editor window).

If your cards still end up in another deck you might have a deck override set for the Image Occlusion note type. Please refer to Card template for instructions on how to undo this.

Clone this wiki locally