Error importing Mnemosyne 2.9 deck

Hi! I’d like to merge to doing spaced repetition w/ Anki and want to import my cards from Mnemosyne 2.9. I tried the following:

  1. Import → select Mnemosyne .db file and got error “Fact has no cards”
  2. Import → select Mnemosyne .cards export, renamed as .zip. Got error: “500: specified file not found in archive”, even w/ a rather simple deck.

Traceback for 1):

Traceback (most recent call last):

  File "/home/lucas/.local/share/AnkiProgramFiles/.venv/lib/python3.13/site-packages/anki/foreign_data/mnemosyne.py", line 177, in fact_view
    fact_view = self.cards[0].fact_view_id
                ~~~~~~~~~~^^^

IndexError: list index out of range


The above exception was the direct cause of the following exception:


Traceback (most recent call last):

  File "/home/lucas/.local/share/AnkiProgramFiles/python/cpython-3.13.5-linux-x86_64-gnu/lib/python3.13/concurrent/futures/thread.py", line 59, in run
    result = self.fn(*self.args, **self.kwargs)

  File "/home/lucas/.local/share/AnkiProgramFiles/.venv/lib/python3.13/site-packages/aqt/operations/__init__.py", line 243, in wrapped_op
    return self._op(mw.col)
           ~~~~~~~~^^^^^^^^

  File "/home/lucas/.local/share/AnkiProgramFiles/.venv/lib/python3.13/site-packages/aqt/import_export/importing.py", line 107, in <lambda>
    op=lambda col: mnemosyne.serialize(path, col.decks.current()["id"]),
                   ~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "/home/lucas/.local/share/AnkiProgramFiles/.venv/lib/python3.13/site-packages/anki/foreign_data/mnemosyne.py", line 34, in serialize
    return gather_data(db, deck_id).serialize()
           ~~~~~~~~~~~^^^^^^^^^^^^^

  File "/home/lucas/.local/share/AnkiProgramFiles/.venv/lib/python3.13/site-packages/anki/foreign_data/mnemosyne.py", line 41, in gather_data
    notes = [fact.foreign_note(used_fact_views) for fact in facts.values()]
             ~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^

  File "/home/lucas/.local/share/AnkiProgramFiles/.venv/lib/python3.13/site-packages/anki/foreign_data/mnemosyne.py", line 166, in foreign_note
    fact_view = self.fact_view()

  File "/home/lucas/.local/share/AnkiProgramFiles/.venv/lib/python3.13/site-packages/anki/foreign_data/mnemosyne.py", line 179, in fact_view
    raise Exception(f"Fact {id} has no cards") from err

Exception: Fact <built-in function id> has no cards

Is there maybe an update needed that can deal w/ Mnemosyne 2.9? Or what can I do to import the cards, including learning data please?

Could you try updating mnemosyne to latest version, 2.11, and trying again?

It seems like every Mnemosyne update breaks our ability to import their files. Have you checked the other posts about Mnemosyne imports to see if anything there helps you? Search results for 'mnemosyne order:latest' - Anki Forums

Renaming the file definitely won’t work. The db file is the one you want, and you should leave the file extension as-is.

@NameLessGO I updated it to version 2.11 and tried again. but the .db file is the same, so there was no difference. also exporting a deck from the new version and trying to import it in Anki gave same error.

@Danika_Dakika yes, I looked at all topics about Mnemosyne and they didn’t apply as I have a different error (Issue importing Mnemosyne cards into Anki and Error importing mnemosyne cards to anki) or were about importing issues related to media import

The export from Mnemosyne is a .cards file but when you rename it to .zip, you can see that it just contains a .xml file (and metadata, and optionally media files) which contains the learning data. or the .db file from Mnemosyne contains learning data as well.

Okay. Thanks for taking a look! We’ll have to see if we can get some developer time to look into this. If they’ve changed their format again, it might require another update on our part.

@lucaseichhorn Have you tried importing the .db file you get from Mnemosyne using File > Save As? I just tested on Mnemosyne 2.11 and that apparently worked. It’s a very simple collection though.

1 Like