Hi everyone,
I was given an Anki deck that a classmate was using, but when I attempt to import it I receive a 500 error that states “note has 2 fields, expected 9.” I have tried importing while already having cards and note types that the deck consists of (in-house lecture cards). I have also tried importing with a clean profile. I was able to view the cards on a web-based Anki deck viewer (Fuzzy-Anki Deck Browser) just to see if the file was corrupted or not, and it loaded the cards just fine. Is there anything else I can try?
Thank you!
Edit: I was able to import the deck through another spaced repetition app that allows .apkg imports (AlgoApp) and the deck was able to be imported with the notes intact, which makes me confident that the apkg file is not corrupted.
Is that the exact text of the error? I’m trying to find it in the source to see what it might indicate. I found something similar, but I’m not sure it’s the same.
Tell us more about what you’re doing –
- Is it an APKG or text/CSV file?
- Which of the apps and which version are you using to import?
- Does this error happen right after you select the file? Or do you reach the import options screen, and the error happens after you choose your options and click
Import?
I’ve seen this error before from this deck https://ankiweb.net/shared/info/1219175376.
One comment says this:
To fix “Error: 500: note has 8 fields, expected 6”:
- Go to Settings > Editing > [Tick Legacy Import/Export handling] ON
- Try to import the deck again. It should give you same error (do it on purpose).
- Go to Tools > Manage Note Types > Select Mnemonics (Simple Deck) > Click Fields Button > Add any two fields with any names (total should be 8)
- Go to Settings > Editing > [UnTick Legacy Import/Export handling] OFF
- Import deck again > In popup window Select Merge notetypes ON (Under Updates Tab)
I vaguely remember fixing it on AnkiDroid by importing it into a really old version, then updating that version. [I deleted that deck immediately after…]
The exact text is “500: note has 2 fields, expected 9”, with no options except to close the import window. To replicate the error, here are the steps I take: File > Import > Select .apkg > Press Import > Anki shows it is processing the cards > “500: note has 2 fields, expected 9”.
I am on Anki 25.09.2 on my Windows PC, but have also tried it on the most recent version of Anki on MacOS and I receive the same error. It is a large .apkg file.
I have many note types, including AnKing and those with many fields, so I’m not sure why the import won’t use one of those when the notes within the deck I am trying to import are of those note types.
I don’t see any option for Legacy Import/Export handling, I’m using Anki on Windows so I’m not sure if that option is in this version. I will try adding some fields to a note and see if it will import.
- Where did you get it? Is it an old file that is possibly outdated?
- If someone else exported it for you, were they using an old version of Anki? Did they have add-ons enabled when they exported?
- Do you have add-ons enabled when you’re importing it? Try running Anki in safe mode before importing – Troubleshooting Checklist #2.
- What import options are you selecting? There appears to be a conflict between the note type you’re importing and a note type you already have. The rest of the steps @ZornHadNoChoice suggested have to do with merging note types.
- Have you tried making a fresh (temporary) profile and importing the file there? If that works, you might be able to create a fresh export APKG and import it into your main profile.
That option was removed quite a while ago, but it also shouldn’t be needed.
After trying various steps without luck (Fresh profile, no addons, etc.). In the end, I had to open the collection file and change the name of the note the cards were on manually. Here is what worked for me in case anyone else has this issue and needs to find a solution:
- Change the .apkg file to a .zip (just rename it and replace .apkg with .zip) and extract the .zip.
- Open the collection.anki21 file using an SQL viewer program (I used DB Browser).
- Find the “models” column within the “col” table.
- Find where it says “name” (for me, it toward the very beginning) and change it to something unique that won’t conflict with any other note types you currently have.
- I also changed the name in the collections.anki2 file, but I’m pretty sure this step isn’t needed since newer Anki versions read the .anki21 file.
- Save your changes.
- Compress the files (not the folder) into a .zip (make sure the new .zip archive doesn’t have a folder within it, make sure its just the files immediately within the archive).
- Rename the .zip to a .apkg
- Import into Anki
Hopefully my struggle will help someone else in the future lol