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

Some images (SVG) give me this error when I try to add them:

Open amatsune opened this issue 3 years ago • 1 comments

Problem description

When I tried opening some SVG files that I had created (some brain diagrams which I want to hide the labels with the add-on) I got the error message pasted bellow. The tweak opens other images just fine (PNG or SVG), but the ones I'm trying to add are giving me that error. I created them with Illustrator. Same issue if I load another image and than try to switch to the image I want once in SVG editor.

Checklist

  • [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

    
    Anki 2.1.26 (70784154) 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-04 15:09:33
    
    
    ===Add-ons (active)===
    (add-on provided name [Add-on folder, installed at, version, is config changed])
    AMBOSS add-on ['0amboss_addon', 2020-08-13T12:20, 'None', '']
    Add Table ['1237621971', 2020-07-25T09:19, 'None', mod]
    AnJoy ['anjoy', 2019-07-31T18:02, 'None', mod]
    Anki Simulator ['anki_simulator', 2020-03-28T16:47, 'None', '']
    AnkiConnect ['2055492159', 2020-07-12T16:54, 'None', '']
    Batch Editing ['291119185', 2019-06-02T15:47, 'None', '']
    BetterTags ['bettertags', 2020-04-28T12:40, 'None', mod]
    Cloze Anything ['330680661', 2019-12-29T19:17, 'None', '']
    Cloze Overlapper ['cloze_overlapper', 2019-02-01T09:37, 'None', '']
    Cookie monster ['1501583548', 2018-04-13T06:38, 'None', '']
    Edit LaTeX build process ['937148547', 2018-10-12T18:33, 'None', '']
    External Note Editor for the Browser ['browser_external_note_editor', 2020-03-10T14:42, 'None', '']
    Image Occlusion Enhanced for Anki 21 alpha ['1374772155', 2020-04-27T23:21, 'None', '']
    Improved Quizlet to Anki 21 Importer ['538351043', 2020-08-31T07:47, 'None', '']
    Insert Randomized Lists multiple choice ['1280092568', 2019-01-15T07:29, 'None', '']
    Mini Format Pack ['295889520', 2018-07-24T14:45, 'None', '']
    PDF Glossary Exporter ['pdf_glossary', 2019-08-19T09:35, 'None', '']
    Review Heatmap ['review_heatmap', 2020-04-30T10:23, 'None', '']
    Search Everywhere - Ctrl+F Find ['search_everywhere', 2020-03-31T17:13, 'None', '']
    Spell Checker ['spell_checker', 0, 'None', '']
    Spelling Police ['1410276506', 2020-03-02T23:13, 'None', mod]
    Symbols As You Type ['2040501954', 2020-04-30T11:32, 'None', '']
    Visual Feedback for Reviews ['review_feedback', 2020-01-29T16:43, 'None', '']
    
    ===IDs of active AnkiWeb add-ons===
    1237621971 1280092568 1374772155 1410276506 1501583548 2040501954 2055492159 291119185 295889520 330680661 538351043 937148547
    
    ===Add-ons (inactive)===
    (add-on provided name [Add-on folder, installed at, version, is config changed])
    Cloze Hide All ['1709973686', 2020-07-20T23:53, '20.7.21i30', '']
    CrowdAnki JSON exportimport Edit history Collaborate on deck creation ['1788670778', 2020-07-05T20:26, 'None', '']
    Editor Autocomplete ['924298715', 2020-01-04T20:54, 'None', '']
    HoochieMama Randomize Rev Queue ['1460733408', 2020-06-03T10:17, 'None', '']
    Syntax Highlighting for Code ['1463041493', 2018-10-06T22:31, 'None', '']

Error message (if any)


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.26 (70784154) 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-04 15:09:33

Caught exception:
Traceback (most recent call last):
  File "aqt\webview.py", line 34, in cmd
  File "aqt\webview.py", line 114, in _onCmd
  File "aqt\webview.py", line 518, in _onBridgeCmd
  File "<C:\Program Files\Anki\decorator.pyc:decorator-gen-10>", line 2, in onBridgeCmd
  File "lib\site-packages\anki\hooks.py", line 638, in decorator_wrapper
  File "lib\site-packages\anki\hooks.py", line 635, in repl
  File "C:\Users\Filip\AppData\Roaming\Anki2\addons21\330680661\cloze_anything\__init__.py", line 181, in onBridgeCmd
    old(self, cmd)
  File "aqt\editor.py", line 408, in onBridgeCmd
  File "C:\Users\Filip\AppData\Roaming\Anki2\addons21\1374772155\main.py", line 101, in <lambda>
    lambda o=editor: onImgOccButton(o),
  File "C:\Users\Filip\AppData\Roaming\Anki2\addons21\1374772155\main.py", line 78, in onImgOccButton
    self.imgoccadd.occlude(image_path)
  File "C:\Users\Filip\AppData\Roaming\Anki2\addons21\1374772155\add.py", line 91, in occlude
    width, height = imageProp(image_path)
  File "C:\Users\Filip\AppData\Roaming\Anki2\addons21\1374772155\utils.py", line 77, in imageProp
    cheight = svg_node.attributes["height"].value
  File "xml\dom\minidom.py", line 552, in __getitem__
KeyError: 'height'

amatsune avatar Sep 05 '20 03:09 amatsune

Same here.

macsunmood avatar Dec 13 '21 13:12 macsunmood