# Notes skipped even though note ID differs

**URL:** <https://forums.ankiweb.net/t/notes-skipped-even-though-note-id-differs/3192>\
**Category:** Help\
**Created:** [September 9, 2020, 3:38am UTC](https://forums.ankiweb.net/t/notes-skipped-even-though-note-id-differs/3192 "2020-09-09T03:38:17Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![tbm](https://avatars.discourse-cdn.com/v4/letter/t/9de053/32.png) [@tbm](https://forums.ankiweb.net/u/tbm)\
**Post date:** [September 9, 2020, 3:38am UTC](https://forums.ankiweb.net/t/notes-skipped-even-though-note-id-differs/3192/1 "2020-09-09T03:38:17Z")

</div>

As a test, I created two decks:

- Deck A has its own deck ID, is own note type with its own ID. Let’s say fields A and B. I create one note with some values.
- Deck B is identical but has its down deck ID and note type ID. But same fields and test note with same value as test note for deck A.

I import deck A. I import deck B. I get:

> Notes found in file: 1  
> Notes skipped, as they’re already in your collection: 1  
> [Identical] moja (number), one

Yes, the values are identical, but the note IDs are different, so why is this note skipped?

Looking at deck A:

> 1|O);\*8+=E!d|4231129472|1599622037|-1| |moja (number)one|moja (number)|0|0|

And deck B:

> 1|O);\*8+=E!d|3135169473|1599622037|-1| |moja (number)one|moja (number)|0|0|

The mid is different. So why does Anki think they are the same?

---

<div class="post-metadata">

**Author:** ![tbm](https://avatars.discourse-cdn.com/v4/letter/t/9de053/32.png) [@tbm](https://forums.ankiweb.net/u/tbm)\
**Post date:** [September 9, 2020, 3:40am UTC](https://forums.ankiweb.net/t/notes-skipped-even-though-note-id-differs/3192/2 "2020-09-09T03:40:13Z")

</div>

I should add that deck B failed to import, so this is clearly causing problems.

It seems there can’t be two independent decks with the same field names and values. This might actually happen in the real world since people often use generic field names like “Front” and “Back”.

---

<div class="post-metadata">

**Author:** ![Rumo](https://sea2.discourse-cdn.com/flex002/user_avatar/forums.ankiweb.net/rumo/32/1505_2.png) [@Rumo](https://forums.ankiweb.net/u/Rumo)\
**Post date:** [September 9, 2020, 6:34am UTC](https://forums.ankiweb.net/t/notes-skipped-even-though-note-id-differs/3192/3 "2020-09-09T06:34:55Z")

</div>

In the import dialog there are three options. The default one is to skip notes with an already existing first field. But you can also choose to import them anyway or to update the existing notes.

---

<div class="post-metadata">

**Author:** ![tbm](https://avatars.discourse-cdn.com/v4/letter/t/9de053/32.png) [@tbm](https://forums.ankiweb.net/u/tbm)\
**Post date:** [September 9, 2020, 11:47am UTC](https://forums.ankiweb.net/t/notes-skipped-even-though-note-id-differs/3192/4 "2020-09-09T11:47:06Z")

</div>

Based on what abdo said in a different thread, it seems these options only show up when importing text files.

I’m importing .apkg files.

---

<div class="post-metadata">

**Author:** ![tbm](https://avatars.discourse-cdn.com/v4/letter/t/9de053/32.png) [@tbm](https://forums.ankiweb.net/u/tbm)\
**Post date:** [September 9, 2020, 12:11pm UTC](https://forums.ankiweb.net/t/notes-skipped-even-though-note-id-differs/3192/5 "2020-09-09T12:11:56Z")

</div>

I uploaded the test case in case someone wants to looks at the `.apkg` files or the code used to generate them.

```auto
git clone https://github.com/tbm/anki-test-same-note-different-deck

```

- Import `test1.apkg`: you get `TEST1 Swahili` deck.
- Import `test2.apkg`: you should get `TEST2 Swahili` deck but it fails to import.

Both decks define a note type with exactly thee same field, but the note IDs are different (as are the deck IDs), so really importing one deck shouldn’t affect the importing of the other deck - but it does.

---

<div class="post-metadata">

**Author:** ![abdo](https://sea2.discourse-cdn.com/flex002/user_avatar/forums.ankiweb.net/abdo/32/654_2.png) [@abdo](https://forums.ankiweb.net/u/abdo)\
**Post date:** [September 9, 2020, 1:43pm UTC](https://forums.ankiweb.net/t/notes-skipped-even-though-note-id-differs/3192/6 "2020-09-09T13:43:25Z")

</div>

I think this is because the notes have the same GUID.  
This may be an issue with the way genanki generates GUIDs; it uses the note fields to generate them, but since both notes have the same content, they will get the same GUID.

You can provide an explicit guid argument to genanki.Note or override the guid property.

See:  
[https://github.com/kerrickstaley/genanki/blob/8ba95590d438c424e196d4cab4f6e5871d571a05/genanki/note.py#L113](https://github.com/kerrickstaley/genanki/blob/8ba95590d438c424e196d4cab4f6e5871d571a05/genanki/note.py#L113)  
[https://github.com/kerrickstaley/genanki/blob/7bb21120ce85be7bb017e3502a6da0c3098fc9f2/genanki/util.py#L11](https://github.com/kerrickstaley/genanki/blob/7bb21120ce85be7bb017e3502a6da0c3098fc9f2/genanki/util.py#L11)

---

<div class="post-metadata">

**Author:** ![tbm](https://avatars.discourse-cdn.com/v4/letter/t/9de053/32.png) [@tbm](https://forums.ankiweb.net/u/tbm)\
**Post date:** [November 27, 2020, 6:44am UTC](https://forums.ankiweb.net/t/notes-skipped-even-though-note-id-differs/3192/7 "2020-11-27T06:44:13Z")

</div>

@abdo sorry for the late response!

Right, the GUID is the same. But as a unique identifier, shouldn’t Anki always look at GUID AND deck id?

There’s no guarantee that different decks don’t have the same GUID.

---

<div class="post-metadata">

**Author:** ![abdo](https://sea2.discourse-cdn.com/flex002/user_avatar/forums.ankiweb.net/abdo/32/654_2.png) [@abdo](https://forums.ankiweb.net/u/abdo)\
**Post date:** [November 27, 2020, 5:58pm UTC](https://forums.ankiweb.net/t/notes-skipped-even-though-note-id-differs/3192/8 "2020-11-27T17:58:53Z")

</div>

Well, as GUIDS are supposed to be **unique** identifiers (each different note is supposed to have a different GUID), I think Anki doesn’t have to check anything other than them when importing. There is a probability of clash in GUIDS generated by Anki but it’s negligable.

(That’s my limited understanding of the situation, maybe @dae can clarify it further)

---

<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:** [November 28, 2020, 12:24am UTC](https://forums.ankiweb.net/t/notes-skipped-even-though-note-id-differs/3192/9 "2020-11-28T00:24:17Z")

</div>

I think the original intention was to combine notetype ID + guid to get a standard UUID size, but I don’t think the current code is doing that. I’d be surprised if conflicts were common in practice however, outside of usage of third-party tools that are not generating them randomly.

---

<div class="post-metadata">

**Author:** ![tbm](https://avatars.discourse-cdn.com/v4/letter/t/9de053/32.png) [@tbm](https://forums.ankiweb.net/u/tbm)\
**Post date:** [November 28, 2020, 2:11am UTC](https://forums.ankiweb.net/t/notes-skipped-even-though-note-id-differs/3192/10 "2020-11-28T02:11:19Z")

</div>

Thanks for the clarification @abdo and @dae. I’ll open a ticket on genanki and see what they say.

---

<div class="post-metadata">

**Author:** ![vadimkantorov](https://sea2.discourse-cdn.com/flex002/user_avatar/forums.ankiweb.net/vadimkantorov/32/9693_2.png) [@vadimkantorov](https://forums.ankiweb.net/u/vadimkantorov)\
**Post date:** [May 23, 2022, 12:27pm UTC](https://forums.ankiweb.net/t/notes-skipped-even-though-note-id-differs/3192/11 "2022-05-23T12:27:13Z")

</div>

Hi. I have the same problem. I’m importing different apkg decks that probably contain notes with the same IDs. I’d still like to import the decks as is without any skips.

My usecase: study three decks simultaneously 2.0HSK1-3 deck, new 3.0HSK1 deck and 2.0HSK4 deck. Currently I can’t even import 3.0HSK1 because almost all notes there are originally taken form 2.0HSK1-3 deck.

---

<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 24, 2022, 3:03am UTC](https://forums.ankiweb.net/t/notes-skipped-even-though-note-id-differs/3192/12 "2022-05-24T03:03:22Z")

</div>

You can import them into a separate profile, then export them as text to disassociate them with the originals.

---

<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:** [May 1, 2023, 4:19am UTC](https://forums.ankiweb.net/t/notes-skipped-even-though-note-id-differs/3192/13 "2023-05-01T04:19:44Z")

</div>


