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

Image Occlusion not working after use of pencil feature

Open andrewmathias8 opened this issue 2 years ago • 9 comments

Problem description

I inserted an image from my downloads in order to occlude certain parts of it (this always works fine). However, after using the "pencil" feature to write over the image, anki gives me an error message (copied below) when I try to create the cards by pressing "hide all, guess one". I believe that this is the issue because when I replicate the process without using the pencil feature the issue does not occur.

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.
  • [ ] 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
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.47 (dc156f34) Python 3.8.6 Qt 5.14.2 PyQt 5.14.2
Platform: Windows 10
Flags: frz=True ao=True sv=2
Add-ons, last update check: 2021-09-01 16:22:09

Caught exception:
Traceback (most recent call last):
  File "aqt\webview.py", line 541, in handler
  File "C:\Users\andre\AppData\Roaming\Anki2\addons21\1374772155\add.py", line 278, in <lambda>
    lambda val, choice=choice, close=close: self._onAddNotesButton(choice, close, val))
  File "C:\Users\andre\AppData\Roaming\Anki2\addons21\1374772155\add.py", line 293, in _onAddNotesButton
    r = gen.generateNotes()
  File "C:\Users\andre\AppData\Roaming\Anki2\addons21\1374772155\ngen.py", line 80, in generateNotes
    (svg_node, layer_node) = self._getMnodesAndSetIds()
  File "C:\Users\andre\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'

Error message (if any)

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


andrewmathias8 avatar Sep 01 '21 21:09 andrewmathias8

I too received the same error only when using the pencil tool.

Picture: image

LHSequalsRHS avatar Sep 14 '21 11:09 LHSequalsRHS

I've got a similar error message when I tried to edit a card using the pencil tool as well:

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 of our support site. Debug info: Anki 2.1.44 (b2b3275f) Python 3.8.6 Qt 5.14.2 PyQt 5.14.2 Platform: Windows 10 Flags: frz=True ao=True sv=2 Add-ons, last update check: 2021-10-16 17:07:38

Caught exception: Traceback (most recent call last): File "aqt\webview.py", line 526, in handler File "C:\Users\Ankified\AppData\Roaming\Anki2\addons21\1374772155\add.py", line 317, in lambda val, choice=choice: self._onEditNotesButton(choice, val)) File "C:\Users\Ankified\AppData\Roaming\Anki2\addons21\1374772155\add.py", line 333, in _onEditNotesButton r = gen.updateNotes() File "C:\Users\Ankified\AppData\Roaming\Anki2\addons21\1374772155\ngen.py", line 109, in updateNotes (svg_node, mlayer_node) = self._getMnodesAndSetIds(True) File "C:\Users\Ankified\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'

ankified avatar Oct 17 '21 00:10 ankified

Same 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.35 (84dcaa86) Python 3.8.1 Qt 5.15.1 PyQt 5.15.1 Platform: Linux Flags: frz=True ao=True sv=2 Add-ons, last update check: 2021-10-18 22:10:17 Add-ons possibly involved: ⁨Image Occlusion Enhanced for Anki 21 alpha⁩

Caught exception: Traceback (most recent call last): File "aqt/webview.py", line 493, in handler File "/home/arjun/.local/share/Anki2/addons21/1374772155/add.py", line 278, in lambda val, choice=choice, close=close: self._onAddNotesButton(choice, close, val)) File "/home/arjun/.local/share/Anki2/addons21/1374772155/add.py", line 293, in _onAddNotesButton r = gen.generateNotes() File "/home/arjun/.local/share/Anki2/addons21/1374772155/ngen.py", line 80, in generateNotes (svg_node, layer_node) = self._getMnodesAndSetIds() File "/home/arjun/.local/share/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'

Screenshot of pencil annotation: image

justpeanuts avatar Oct 19 '21 05:10 justpeanuts

Same error- 错误 有一个错误发生了.请在按住shift键的同时启动Anki,这样可以临时的禁用您已经安装的插件。 如果仅仅是因为插件引起的问题,请选择工具>插件菜单项来将出错的的插件设置成失效,然后重启Anki,重复以上的步骤直到你发现了具体是哪个插件引起的问题。 当你已经发现是因为插件引起的问题,请在我们的支持网站上 插件支持 上报告问题。 调试信息: Anki 2.1.49 (dc80804a) Python 3.8.6 Qt 5.14.2 PyQt 5.14.2 Platform: Windows 7 Flags: frz=True ao=True sv=2 Add-ons, last update check: 2021-12-12 08:57:57

Caught exception: Traceback (most recent call last): File "aqt\webview.py", line 541, in handler File "C:\Users\InsDreamb\AppData\Roaming\Anki2\addons21\1374772155\add.py", line 278, in lambda val, choice=choice, close=close: self._onAddNotesButton(choice, close, val)) File "C:\Users\InsDreamb\AppData\Roaming\Anki2\addons21\1374772155\add.py", line 293, in _onAddNotesButton r = gen.generateNotes() File "C:\Users\InsDreamb\AppData\Roaming\Anki2\addons21\1374772155\ngen.py", line 80, in generateNotes (svg_node, layer_node) = self._getMnodesAndSetIds() File "C:\Users\InsDreamb\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' TX_$MXN}2XGWONT{H406Y

Hy-Fran avatar Dec 12 '21 01:12 Hy-Fran

Same error! Checklist Please replace the space inside the brackets with an x if the following items apply:

  1. I've restarted Anki to see if it helps
  2. I've verified that I use the latest version of the add-on by redownloading it from AnkiWeb
    1. I've verified that I use the latest version of Anki by checking at https://apps.ankiweb.net#download
  3. I've tried to disable other add-ons to see if there are any interactions present My issue didn't disappears when I hold shift while starting Anki.
  4. 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. 我的具体问题在于使用铅笔工具后无法添加成为卡片!! 以下为信息报错的内容: 错误 有一个错误发生了.请在按住shift键的同时启动Anki,这样可以临时的禁用您已经安装的插件。 如果仅仅是因为插件引起的问题,请选择工具>插件菜单项来将出错的的插件设置成失效,然后重启Anki,重复以上的步骤直到你发现了具体是哪个插件引起的问题。 当你已经发现是因为插件引起的问题,请在我们的支持网站上 插件支持 上报告问题。 调试信息: Anki 2.1.44 (b2b3275f) Python 3.8.6 Qt 5.14.2 PyQt 5.14.2 Platform: Windows 10 Flags: frz=True ao=True sv=2 Add-ons, last update check: 2022-01-27 16:54:40

Caught exception: Traceback (most recent call last): File "aqt\webview.py", line 526, in handler File "C:\Users\s1786\AppData\Roaming\Anki2\addons21\1374772155\add.py", line 278, in lambda val, choice=choice, close=close: self._onAddNotesButton(choice, close, val)) File "C:\Users\s1786\AppData\Roaming\Anki2\addons21\1374772155\add.py", line 293, in _onAddNotesButton r = gen.generateNotes() File "C:\Users\s1786\AppData\Roaming\Anki2\addons21\1374772155\ngen.py", line 80, in generateNotes (svg_node, layer_node) = self._getMnodesAndSetIds() File "C:\Users\s1786\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' 我快哭了,终于让我找到了

sijin-jade avatar Jan 27 '22 21:01 sijin-jade

Same applies for me:

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 to the add-on author. Debug info: Anki 2.1.51 (cf78a555) Python 3.9.7 Qt 6.2.2 PyQt 6.2.2 Platform: Windows 10 Flags: frz=True ao=True sv=2 Add-ons, last update check: 2022-05-03 09:44:57

Caught exception: Traceback (most recent call last): File "aqt.webview", line 562, in handler File "C:\Users\lenovo\AppData\Roaming\Anki2\addons21\1374772155\add.py", line 324, in lambda val, choice=choice, close=close: self._onAddNotesButton( File "C:\Users\lenovo\AppData\Roaming\Anki2\addons21\1374772155\add.py", line 343, in _onAddNotesButton r = gen.generateNotes() File "C:\Users\lenovo\AppData\Roaming\Anki2\addons21\1374772155\ngen.py", line 99, in generateNotes (svg_node, layer_node) = self._getMnodesAndSetIds() File "C:\Users\lenovo\AppData\Roaming\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'

image

RyanBlackeyes avatar May 03 '22 10:05 RyanBlackeyes

Thanks for the detailed reports guys! It's much appreciated I was able to reproduce the issue locally and will look into it.

Fair warning, however: There is a good chance this is not solvable without updating to a newer version of SVG-Edit, and unfortunately that might not be feasible to do. But I will see if I can find a solution.

glutanimate avatar Sep 17 '22 16:09 glutanimate

Thanks for the detailed reports guys! It's much appreciated I was able to reproduce the issue locally and will look into it.

Fair warning, however: There is a good chance this is not solvable without updating to a newer version of SVG-Edit, and unfortunately that might not be feasible to do. But I will see if I can find a solution.

What is up man, anything happened aout the pencil problem, it's been a moth by now ??

Basekman avatar Oct 16 '22 13:10 Basekman

So how can i update SEG-Edit to a newer version? Can it be taught?

sijin-jade avatar Dec 07 '22 21:12 sijin-jade