# Issue importing Mnemosyne cards into Anki

**URL:** <https://forums.ankiweb.net/t/issue-importing-mnemosyne-cards-into-anki/44757>\
**Category:** Help\
**Created:** [May 13, 2024, 7:09pm UTC](https://forums.ankiweb.net/t/issue-importing-mnemosyne-cards-into-anki/44757 "2024-05-13T19:09:41Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![mnemosyne99](https://avatars.discourse-cdn.com/v4/letter/m/9fc29f/32.png) [@mnemosyne99](https://forums.ankiweb.net/u/mnemosyne99)\
**Post date:** [May 13, 2024, 7:09pm UTC](https://forums.ankiweb.net/t/issue-importing-mnemosyne-cards-into-anki/44757/1 "2024-05-13T19:09:41Z")

</div>

Hello - I’d like to import a Mnemosyne 2.73 .db file (~100k cards) into Anki, but I keep getting this error: **500: JsonError { info: “invalid type: floating point `1736293344.5096483`, expected i32 at line 1 column 8848” }**

Can anyone help me with this problem? Also, assuming it is still possible to import Mnemosyne cards into Anki, is there a way to maintain the scheduling data? I have been learning these cards for years and would _really_ prefer to not have to start from scratch. Thanks!

---

<div class="post-metadata">

**Author:** ![Danika\_Dakika](https://sea2.discourse-cdn.com/flex002/user_avatar/forums.ankiweb.net/danika_dakika/32/17815_2.png) [@Danika\_Dakika](https://forums.ankiweb.net/u/Danika_Dakika)\
**Post date:** [May 14, 2024, 1:05am UTC](https://forums.ankiweb.net/t/issue-importing-mnemosyne-cards-into-anki/44757/2 "2024-05-14T01:05:48Z")

</div>

We recently discussed some of the issues with Mnemosyne imports and workarounds to try. But I don’t know whether a “Mnemosyne 2.73 .db file” is similar enough to a Mnemosyne **2.0** db file to work with the same process.

---

<div class="post-metadata">

**Author:** ![dae](https://sea2.discourse-cdn.com/flex002/user_avatar/forums.ankiweb.net/dae/32/65_2.png) [@dae](https://forums.ankiweb.net/u/dae)\
**Post date:** [May 14, 2024, 2:25pm UTC](https://forums.ankiweb.net/t/issue-importing-mnemosyne-cards-into-anki/44757/3 "2024-05-14T14:25:33Z")

</div>

Please use a file-sharing service like Google Drive to share a link to the file with me privately on [anki.tenderapp.com](http://anki.tenderapp.com)

---

<div class="post-metadata">

**Author:** ![dae](https://sea2.discourse-cdn.com/flex002/user_avatar/forums.ankiweb.net/dae/32/65_2.png) [@dae](https://forums.ankiweb.net/u/dae)\
**Post date:** [May 17, 2024, 5:42am UTC](https://forums.ankiweb.net/t/issue-importing-mnemosyne-cards-into-anki/44757/4 "2024-05-17T05:42:25Z")

</div>

Thanks for providing the file. A fix for this will be in the next beta build, which will hopefully be available within a few days.

---

<div class="post-metadata">

**Author:** ![mnemosyne99](https://avatars.discourse-cdn.com/v4/letter/m/9fc29f/32.png) [@mnemosyne99](https://forums.ankiweb.net/u/mnemosyne99)\
**Post date:** [June 7, 2024, 4:48pm UTC](https://forums.ankiweb.net/t/issue-importing-mnemosyne-cards-into-anki/44757/5 "2024-06-07T16:48:31Z")

</div>

Just following up on this - thanks to the new beta build, I was able to upload my Mnemosyne cards to my Anki database, and it looks like the learning data is more or less intact. But I’ve run into a problem - the clozes themselves are not recognized (“No cloze ⁨2⁩ found on card. Please either add a cloze deletion, or use the Empty Cards tool”) so I can’t review them.

I assume this is because they’re in the Mnemosyne Cloze style (e.g. [text]) and not the Anki cloze (e.g. {{c1::text}} style. Is there an easy way for me to convert all my notes at once (including ones with multiple clozes), perhaps with the Find and Replace function? Please let me know!

---

<div class="post-metadata">

**Author:** ![Danika\_Dakika](https://sea2.discourse-cdn.com/flex002/user_avatar/forums.ankiweb.net/danika_dakika/32/17815_2.png) [@Danika\_Dakika](https://forums.ankiweb.net/u/Danika_Dakika)\
**Post date:** [June 7, 2024, 7:05pm UTC](https://forums.ankiweb.net/t/issue-importing-mnemosyne-cards-into-anki/44757/6 "2024-06-07T19:05:59Z")

</div>

Yes, that’s why – _but don’t use Empty Cards if you brought over review history with those cards that you want to keep_. It will delete those cards and their history.

And yes, you can do that with [Find and Replace](https://docs.ankiweb.net/browsing.html#find-and-replace). You’ll need some knowledge of RegEx but it’s pretty straightforward (and if you post a sample text, I bet someone could help you figure it out). But are the Mnemosyne clozes not numbered? That might be extra challenging …

Another way to make a change like this is by exporting the fields to a text/CSV so that you can manipulate the text, and then re-importing it to update your notes. Which option will be easier depends a lot on what tools you’re most comfortable working with (and how many notes need fixing).

---

<div class="post-metadata">

**Author:** ![mnemosyne99](https://avatars.discourse-cdn.com/v4/letter/m/9fc29f/32.png) [@mnemosyne99](https://forums.ankiweb.net/u/mnemosyne99)\
**Post date:** [June 8, 2024, 1:43am UTC](https://forums.ankiweb.net/t/issue-importing-mnemosyne-cards-into-anki/44757/7 "2024-06-08T01:43:26Z")

</div>

Yeah, the Mnemosyne clozes aren’t numbered. Here’s an example card:

[Elizabeth Bennet] is the protagonist of [Jane Austen]'s novel [Pride and Prejudice].

I want to use Find and Replace to convert this to

{{c1::Elizabeth Bennet}} is the protagonist of {{c2::Jane Austen}}'s novel {{c3::Pride and Prejudice}}.

I’ve been able to use F&R to convert […] to {{c1::…}}, but I’m not sure what syntax is needed to get the program to recognize each of my clozes as distinct and label them accordingly.

If I instead exported the cards to text/CSV, edited them and then re-imported them in that form, wouldn’t I lose the learning data?

---

<div class="post-metadata">

**Author:** ![Danika\_Dakika](https://sea2.discourse-cdn.com/flex002/user_avatar/forums.ankiweb.net/danika_dakika/32/17815_2.png) [@Danika\_Dakika](https://forums.ankiweb.net/u/Danika_Dakika)\
**Post date:** [June 9, 2024, 6:06pm UTC](https://forums.ankiweb.net/t/issue-importing-mnemosyne-cards-into-anki/44757/8 "2024-06-09T18:06:46Z")

</div>

> [@mnemosyne99](#):
>
> If I instead exported the cards to text/CSV, edited them and then re-imported them in that form, wouldn’t I lose the learning data?

Let’s deal with the easy part first – no, you wouldn’t. As long as you make sure your notes remain updatable during [the export/import process](https://docs.ankiweb.net/exporting.html), Anki will update your notes.

> [@mnemosyne99](#):
>
> I’ve been able to use F&R to convert […] to {{c1::…}}, but I’m not sure what syntax is needed to get the program to recognize each of my clozes as distinct and label them accordingly.

I think with some careful regex, this will work if you go one cloze at a time.  
By that I mean, limit your action to just the first `[]` pair, and replace that as a c1. Then you can narrow yourself to just looking at notes that still have a `[]` pair, and act only on the now-first pair by replacing that as a c2, and so on.

My regex is at a “dabbler” level, but if you post what search you’re using, I might be able to help you customize it. (As long as you promise to backup before using anything I give you, and Undo as necessary!)

---

<div class="post-metadata">

**Author:** ![dae](https://sea2.discourse-cdn.com/flex002/user_avatar/forums.ankiweb.net/dae/32/65_2.png) [@dae](https://forums.ankiweb.net/u/dae)\
**Post date:** [June 10, 2024, 5:41am UTC](https://forums.ankiweb.net/t/issue-importing-mnemosyne-cards-into-anki/44757/9 "2024-06-10T05:41:40Z")

</div>

I can’t think of a way you can accomplish this in Anki without some programming. You may want to consider paying someone to automate the process for you, if you don’t get any better suggestions. @abdo might be interested. Alternatively, you could replace all clozes with c1, then manually edit notes as you encounter empty cards during review.

---

<div class="post-metadata">

**Author:** ![mnemosyne99](https://avatars.discourse-cdn.com/v4/letter/m/9fc29f/32.png) [@mnemosyne99](https://forums.ankiweb.net/u/mnemosyne99)\
**Post date:** [June 12, 2024, 7:56pm UTC](https://forums.ankiweb.net/t/issue-importing-mnemosyne-cards-into-anki/44757/10 "2024-06-12T19:56:33Z")

</div>

Here’s the search I’ve been using:

Find: “[”

Replace: “{{c1::”

I then repeat this with “]” and “}}” to complete the cloze modification. I’m sure that there is regex to do “[…]” to “{{c1::…}}” all at once, but I haven’t figured it out yet. Anki already recognizes my individual Mnemosyne clozes as Cloze 1, Cloze 2, etc. when it comes to the browser function - so if there’s a way to use the F&R function to specifically modify _cards_ instead of entire _notes_, then I think we’d be in great shape.

---

<div class="post-metadata">

**Author:** ![Danika\_Dakika](https://sea2.discourse-cdn.com/flex002/user_avatar/forums.ankiweb.net/danika_dakika/32/17815_2.png) [@Danika\_Dakika](https://forums.ankiweb.net/u/Danika_Dakika)\
**Post date:** [June 13, 2024, 12:27am UTC](https://forums.ankiweb.net/t/issue-importing-mnemosyne-cards-into-anki/44757/11 "2024-06-13T00:27:56Z")

</div>

> [@mnemosyne99](#):
>
> so if there’s a way to use the F&R function to specifically modify _cards_ instead of entire _notes_, then I think we’d be in great shape.

There isn’t. You can modify notes and templates – the cards themselves are Anki’s territory. Especially because the cards exist already, assigning clozes to them in the way Anki expects will be your the best bet.

* * *

Okay, I make no claims that this is the most elegant way to do this – but I just successfully turned your text into this with 3 successive F&Rs, so I think it’s worth a shot!

> {{c1::Elizabeth Bennet] is the protagonist of {{c2::Jane Austen]'s novel {{c3::Pride and Prejudice].

I tested this by creating a 3-cloze note, and then replacing the text with your bracketed text, so I had 3 this-card-is-blanks. After the replaces, the 3 cards were successful clozes again.

You’re right that you can take care of the end brackets/braces with a single find `]` & replace `}}` – so do that first. I assume you don’t have any square brackets in your notes for any other purpose? And is it safe to assume there are no line-breaks within the notes?

Consider limiting it to the one field you need – but definitely check “Selected notes only.” For the end brackets, untick “Treat input as regular expression” – for the below, tick that.  
 ![image](https://us1.discourse-cdn.com/flex002/uploads/anki2/original/3X/e/5/e5d8addc258731af4bf6ae618d7dd048ef88838a.png)

Looks like gibberish, but here’s what this means –

- Find everything that is not `[` and grab that as 1
- Find one `[`
- Find everything else and grab that as 2
- Then put back `1{{c1::2`

You’ll do it once for c1, and then the 2nd time through change it to c2, etc.

[Please backup before you start! Then try it on _just one_ note so you can see the change happening, and undo as necessary!]

find:  
`([^\[])\[(.*)`  
replace:  
`${1}{{c1::${2}`

then replace:  
`${1}{{c2::${2}`  
then replace:  
`${1}{{c3::${2}`

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex002/uploads/anki2/original/1X/8f1279ababc5879d54e4838989f606cfe55af8c7.jpeg) [@system](https://forums.ankiweb.net/u/system)\
**Post date:** [July 13, 2024, 12:28am UTC](https://forums.ankiweb.net/t/issue-importing-mnemosyne-cards-into-anki/44757/12 "2024-07-13T00:28:40Z")

</div>

Closed on July 13, 2024, 12:28am UTC

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
