glutanimate / image-occlusion-enhanced

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

No cards to generate when creating image occlusion notes in editor #113

Open skygate2012 opened 5 years ago

skygate2012 commented 5 years ago

Problem description

Sometimes, after creating several notes consecutively, it returns "No cards to generate" when I click the button to add cards although there are masks present on the image. Also, if I zoom the image or re-save the source code of the svg document the masks would move outside of the working area and become unselectable.

Snipaste_2019-08-29_17-07-39 Snipaste_2019-08-29_17-09-24

Checklist

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

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.13 (3ba55990) Python 3.6.7 Qt 5.12.1 PyQt 5.11.3
Platform: Windows 10
Flags: frz=True ao=True sv=1

Add-ons:

Quick note and deck buttons Fork for 21
Image Occlusion Enhanced for Anki 21 alpha
Card Layout Editor - syntax highlighting monospace font
Night Mode
Zoom 21
editor apply font color background color custom class custom style
Customize Keyboard Shortcuts
Mini Format Pack
Set Font Size
Cloze Overlapper
review_heatmap

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

glutanimate commented 5 years ago

Hi. Thanks for the report. The next time you encounter that message, could you please check if the masks are correctly drawn in the masks layer and not the labels layer? (To check, draw up the layers pane to the right of the editor and then click on the eye icon next to the Masks and Labels layers respectively to identify which one the drawn shapes are in)

Should the shapes reside in the Masks layer then we need to look at some other things.

The most important question for me then would be how your typical card creation workflow looks like with image occlusion. Like, do you use the "Change image" button to select a different image, or do you close the image occlusion window after each addition and start back from Anki's regular "Add Notes" screen (hitting the image occlusion button in the top right row, and then selecting your image). Please try to walk me through your steps leading up to the error message as best you can.

skygate2012 commented 5 years ago

Hi. Thanks for the report. The next time you encounter that message, could you please check if the masks are correctly drawn in the masks layer and not the labels layer? (To check, draw up the layers pane to the right of the editor and then click on the eye icon next to the Masks and Labels layers respectively to identify which one the drawn shapes are in)

Should the shapes reside in the Masks layer then we need to look at some other things.

The most important question for me then would be how your typical card creation workflow looks like with image occlusion. Like, do you use the "Change image" button to select a different image, or do you close the image occlusion window after each addition and start back from Anki's regular "Add Notes" screen (hitting the image occlusion button in the top right row, and then selecting your image). Please try to walk me through your steps leading up to the error message as best you can.

I've checked out the layers panel and the masks shape are correctly residing in the Masks layer. My workflow is the same as your first description. I keep the editor window opened since I'm creating the notes from a textbook from beginning to end. First I click the "Add Image Occulation" button on Anki's regular "Add Notes" screen, select an image from local disk, draw the masks, and click the "Hide one, guess one" button to add the cards. After that I would select and clear all the masks, change a different image from local disk by clicking the "Change image" button in the editor window, draw the masks and add the cards. The issue would happen roughly in about 5-10 continuous creations with this workflow.