Problem with new CSV import settings

Hi there!

Importing cards has become heavy going for me, because of the new update (2.1.55).

Before that update, when you imported cards from a CSV file, the content of unmapped fields was ignored — so Anki only imported useful content (an “unmapped field” is a field where you’ve included a Field Separator - a semicolon “;” for example).

But now, Anki will “Keep content of unmapped fields when importing CSV” so it imports a bunch of useless lines from my CSV files. This is presented as an “improvement” by Rumo, so it must be useful to many people. However, I’d love to have the option to exclude unmapped fields.

Why is it useful to exclude unmapped fields from CSV imports?
I have a workflow that allows me to create flashcards from inspiring conversations with friends: I make notes during the conversation and when there’s something I’d like to turn into a flashcard, I write it down as a question (with semicolons as Field Separators, so that Anki recognises which lines to import). I do all this in a .txt file. However, not everything I write down is meant to be turned into a card, so there are several lines that I’d like Anki to skip.

Does any of you know how to contact the developers and send them feedback about this?

In the meantime, I’m going to revert to an older version of Anki. That’s a shame because I liked the look and feel of the latest version!

P.S. here’s a screenshot of the changelog:

Many thanks to anyone who responds, and have a nice day!

‘Keeping content of unmapped field’ means that a field of an existing note, that no column is mapped to, remains unchanged (instead of being cleared) when the notes is updated via a CSV import. This the – very reasonable – behaviour of the old importer and, while I’m not sure what you’re struggling with, this doesn’t seem to be it.

an “unmapped field” is a field where you’ve included a Field Separator - a semicolon “;” for example

You seem to refer to columns. And as is the point of mapping, a CSV column that is not mapped to anything, as well as the fields that make it up, are ignored during the import process.

But now, Anki will “Keep content of unmapped fields when importing CSV” so it imports a bunch of useless lines from my CSV files.

If you say ‘lines’, do you mean ‘rows’? Since there is no mapping for rows, all rows of a CSV file are imported indiscriminately. This has never been any different.

Could you try to explain again what seems to be the problem?


Rumo, thanks so much for your reply. I really appreciate it.

Apologies for the lack of clarity, I’ve probably used the terminology incorrectly. Let me give you an example. The following is part of a .txt file I created during a conversation:

What’s the advantage of thinking in categories? (when things are a continua) ; it makes it easier for us to understand, evaluate and remember stuff ;sapolsky

Quelle est la racine du mot “respect”? ;regarder (respicere) ;etymology

—>percevoir la personne telle qu’elle est, et non la percevoir à travers le prisme de nos besoins, désirs et rêves

Pain and growth - Why is it important to feel the pain? ;Because it provides you with the energy and motivation to change ;growth

routine du travail et du plaisir, peu d’initiative

Some sentences contain 2 semicolons. I want to import those lines only (front ;back ;tag). Sentences where there aren’t any semicolons are just thoughts I jotted down in the flow of the conversation (such as the sentence starting with “—>percevoir…” or “routine…”). I do not want to import those.

Before I updated Anki, when I imported notes from my .txt file, the sentences/lines that I didn’t want to import were automatically ignored, since they don’t contain any semicolon. But now Anki imports everything, so I have to clean up manually by deleting the cards I don’t want.

Is this any clearer?

Note: I updated Anki at the beginning of the week and hadn’t updated it since late October, so I can’t tell exactly which update caused this.

P.S. when I said “line”, I meant line in the .txt file. For example, in the extract from my .txt file I copied above, there are 5 “lines” (and I only want to turn 3 of them into cards/notes).

Ah, I think I understand now. Probably the old importer ignored rows with too few values, whereas the new importer interprets missing fields as empty strings. It seems that you had taken advantage of this implementation detail.
Strictly speaking, each row in a CSV file must have the same amount of fields. The behaviour for incomplete CSV files is undefined.
Fortunately, there is a better way to skip lines: Just prefix them with a # to mark them as comments. This is an official Anki feature, so it won’t suddenly stop working.


Ah I see, thank you so much!

Sometimes though, I have those conversations over Skype and I write in the chat (with the semicolons for what I want to turn into cards) so my friend can see it — so when I copy the contents of the chat and paste it into a .txt file, there’s a bunch of time automatic time markers like “10:28” in the file — I can’t prefix those with a #. Is there a way to automatically skip those lines?

If there isn’t, that’s fine, I’ll stick to the older version. Thank you so much for your help so far.

No, there isn’t. Anki expects valid CSV.

Ok, thank you for your help.

1 Like