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

Shapes and lines are bugged

Open ClinicalGTacc opened this issue 3 years ago • 2 comments

When I open an image in image occlusion and try to make a shape from shape library, the shape appears but it seems to be stuck on top left side and I can't move it. If i try to make card with it, hide one or all doesn't matter, the debug info on bottom appear and it doesn't create the card.

Another bug is if I make a line and if I turn it to an arrow then create, it doesn't create the card and another debug info pop up appears.

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. (the bug is on image occlusion)
  • [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 2.1.33 (3f403040) 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-09-02 22:33:23
    
    
    ===Add-ons (active)===
    (add-on provided name [Add-on folder, installed at, version, is config changed])
    Batch Editing ['291119185', 2019-06-02T21:47, 'None', '']
    Dancing Baloney Allows changing wallpapers with live preview ['378638814', 2020-03-27T08:28, 'None', mod]
    Hierarchical Tags 2 ['594329229', 2020-04-11T19:36, 'None', '']
    Image Occlusion Enhanced for Anki 21 alpha ['1374772155', 2020-04-28T05:21, 'None', '']
    LPCG LyricsPoetry Cloze Generator ['2084557901', 2020-07-12T02:06, 'None', '']
    Review Heatmap ['review_heatmap', 2020-04-30T16:23, 'None', '']
    
    ===IDs of active AnkiWeb add-ons===
    1374772155 2084557901 291119185 378638814 594329229
    
    ===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:

Arrow:

Debug info:
Anki 2.1.33 (3f403040) 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-09-02 22:33:23

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

Shape library:

Debug info:
Anki 2.1.33 (3f403040) 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-09-02 22:33:23

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

ClinicalGTacc avatar Sep 03 '20 06:09 ClinicalGTacc

I have a similar issue. The shape appears in top left corner but can't be moved. If I click repeatedly on it, I sometimes manage to move it, but then it weirdly recreate it in duplicate in the top left corner again and leave an empty blue selection square in its place. Resizing the size also doesn't work properly.

So for instance, here I succeeded to move the arrow around, but when I let go of the mouse, the arrow reappear in corner and leaves an empty blue square in place where it was.

Shape bug

Rozelda avatar Sep 19 '20 18:09 Rozelda

Similar issue with OP. Here are the steps I can replicate it with

  1. Switch to 'Labels' layer
  2. Draw line
  3. Switch to 'Mask' layer
  4. Insert rectangle mask
  5. Click "Hide All, Guess One"
  6. Error message: AttributeError: 'NoneType' object has no attribute 'encode'

Unrelated but @Rozelda I'm also using flash cards for price action patterns if you want to share any general tips/tricks.

cameronj86 avatar Jan 24 '21 20:01 cameronj86