Error w/ card display

35 views
Skip to first unread message

Bithov Vinu Student

unread,
Feb 26, 2021, 9:52:43 AM2/26/21
to mnemosyne-...@googlegroups.com
Hi,

I recently imported into my Mnemosyne collection an Anki deck of Image Occlusions. My personal setting for Mnemosyne is to display cards "in two boxes with adaptive size" but I noticed that when I tried to review the  image occlusion flashcards, I'd get the following error:

An unexpected error has occurred.
Please forward the following info to the developers:

Traceback (innermost last):
  File "/usr/lib/python3/dist-packages/mnemosyne/pyqt_ui/main_wdgt.py", line 255, in configure
    self.controller().show_configuration_dialog()
  File "/usr/lib/python3/dist-packages/mnemosyne/libmnemosyne/controllers/default_controller.py", line 985, in show_configuration_dialog
    self.review_controller().update_dialog(redraw_all=True)
  File "/usr/lib/python3/dist-packages/mnemosyne/libmnemosyne/review_controllers/SM2_controller.py", line 196, in update_dialog
    self.update_qa_area(redraw_all)
  File "/usr/lib/python3/dist-packages/mnemosyne/libmnemosyne/review_controllers/SM2_controller.py", line 236, in update_qa_area
    w.clear_answer()
  File "/usr/lib/python3/dist-packages/mnemosyne/pyqt_ui/review_wdgt.py", line 252, in clear_answer
    self.update_stretch_factors()
  File "/usr/lib/python3/dist-packages/mnemosyne/pyqt_ui/review_wdgt.py", line 148, in update_stretch_factors
    self.estimate_height(self.question_text)
  File "/usr/lib/python3/dist-packages/mnemosyne/pyqt_ui/review_wdgt.py", line 126, in estimate_height
    with Image.open(img_file) as im:
  File "/usr/lib/python3/dist-packages/PIL/Image.py", line 2930, in open
    raise UnidentifiedImageError(
 PIL.UnidentifiedImageError: cannot identify image file '/home/bithov/.local/share/mnemosyne/default.db_media/85ec8607fbf344d48c13477052ba48fe-ao-1-Q.svg'

I think I might be able to fix this by manually making image occlusions using GIMP or Krita, but that's far too labour intensive for me to do as anything but a last shot. I strongly prefer Mnemosyne, and the Anki scheduler is far too strict, so I'd rather not switch purely for Image Occlusions. I only get the error when I use the "adaptive size" setting; using the "fixed size" option works and so does the "single top-aligned box" option.

(Note: I'm on Ubuntu 20.10, but I've tested whether it works on my Windows machine and it's reporting similar errors).

Thanks,
Bithov

Student Account
Calday Grange Grammar School is a charitable company limited by guarantee and registered in England and Wales with company number 8332696.
The Registered Office is at Grammar School Lane, West Kirby, Wirral, CH48 8GG

Peter Bienstman

unread,
Feb 26, 2021, 9:57:36 AM2/26/21
to mnemosyne-...@googlegroups.com
In this case, I'm afraid you'll have to use fixed size or single top aligned. The reason is that for adaptive size, we use a heuristic that takes a look at the size of the image using a library which cannot work with svg files. (Since svg files are vector files which can be scaled to any size, that makes perfect sense...)

Peter

--
You received this message because you are subscribed to the Google Groups "mnemosyne-proj-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mnemosyne-proj-u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mnemosyne-proj-users/CADr1GP-3%2BRCGnSeZoGa1aJtk1gkx%2BgvDLhMU2JBzqZTiyoBAyg%40mail.gmail.com.
Reply all
Reply to author
Forward
0 new messages