image-occlusion-enhanced icon indicating copy to clipboard operation
image-occlusion-enhanced copied to clipboard

Pencil Draw on Image Occlusion is not working

Open Ayesha20-56 opened this issue 5 months ago • 0 comments

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? Hi! I am using the Image Occlusion feature on Anki on my computer, and I keep receiving an error whenever I try to use the pencil to draw. I can use other tools such as text, I can create shapes and I can use the line feature. However, no matter if the pencil drawing is in labels or masks, it will not create the card if there is any pencil drawing plus image occlusion boxes.

Checklist

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

  • [ x] I've restarted Anki to see if it helps
  • [ x] I've verified that I use the latest version of the add-on by redownloading it from AnkiWeb
  • [ x] I've verified that I use the latest version of Anki by checking at https://apps.ankiweb.net#download
  • [ x] 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.
  • [ x] 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 23.12.1 (1a1d4d54)  (ao)
Python 3.9.15 Qt 6.5.3 PyQt 6.5.3
Platform: macOS-14.0-arm64-arm-64bit

===Add-ons (active)===
(add-on provided name [Add-on folder, installed at, version, is config changed])
Image Occlusion Enhanced ['1374772155', 2022-04-09T08:15, '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)

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


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, repeat 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-ons section](https://forums.ankiweb.net/c/add-ons/11) of our support site. 

Debug info:
Anki 2.1.54 (b6a7760c) Python 3.9.7 Qt 6.3.1 PyQt 6.3.1
Platform: Mac 14.0
Flags: frz=True ao=True sv=3
Add-ons, last update check: 2024-01-30 07:14:04
Add-ons possibly involved: ⁨Image Occlusion Enhanced⁩

Caught exception:
Traceback (most recent call last):
  File "aqt.webview", line 568, in handler
  File "/Users/abrahams/Library/Application Support/Anki2/addons21/1374772155/add.py", line 324, in <lambda>
    lambda val, choice=choice, close=close: self._onAddNotesButton(
  File "/Users/abrahams/Library/Application Support/Anki2/addons21/1374772155/add.py", line 343, in _onAddNotesButton
    r = gen.generateNotes()
  File "/Users/abrahams/Library/Application Support/Anki2/addons21/1374772155/ngen.py", line 99, in generateNotes
    (svg_node, layer_node) = self._getMnodesAndSetIds()
  File "/Users/abrahams/Library/Application Support/Anki2/addons21/1374772155/ngen.py", line 226, in _getMnodesAndSetIds
    mask_doc = minidom.parseString(self.new_svg.encode("utf-8"))
AttributeError: 'NoneType' object has no attribute 'encode'

Ayesha20-56 avatar Jan 30 '24 07:01 Ayesha20-56