Arthur-Milchior / anki-copy-note

An add-on to copy anki's note
GNU General Public License v3.0
23 stars 9 forks source link

Tested ijgnd's new version and found no issues #40

Open tomkahn opened 3 years ago

tomkahn commented 3 years ago

Hi @ijgnd ,

apologies for the delay. I just tested your latest version of Arthur's copy notes addon and can only report success.

I cloned a collection from 3000 to ~ 14000 cards and had no issues: Not while doing reviews, not in preview mode and not after syncing, reviewing in AnkiWeb and syncing back. I also made Anki do a database check. I used Anki 2.1.47.

One question that came to my mind: You clone notes by creating a new nid with the old nid value +1. What if this nid is already taken? I assume you check beforehand? Otherwise I don't see much that could go wrong.

One other thing: Could you imagine working with me on this project? As I mentioned I would be willing to pay for it.

tomkahn commented 3 years ago

@ijgnd Also see: https://github.com/simgunz/anki21-addons_fast-cards-reposition/issues/9

ijgnd commented 3 years ago

@Arthur-Milchior: the version of the add-on "copy note" that tomkahn refers to is in my fork and I have a pull request for all the differences at https://github.com/Arthur-Milchior/anki-copy-note/pull/37. You pulled and published a first try of mine about two weeks ago but unfortunately this had two bugs. Apparently my second attempt works better - tomkahn says it in this thread and another user says it in another thread. Could you update the ankiweb listing with this new version in a few days?

 

tomkahn wrote:

You clone notes by creating a new nid with the old nid value +1. What if this nid is already taken? I assume you check beforehand? Otherwise I don't see much that could go wrong.

@tomkahn: thanks for testing. Arthur has a function that finds a unique id that he has used for years. So his code definitely worked. So if there's a problem my changes introduced them. Arthur has this warning in his code: " be careful not to create multiple objects without flushing them, or they may share an ID." I think I flush the notes (=write the changes to the database) at the right time and my short manual testing didn't show problems. But I prefer to have independent verification in this area so it would be great if you could also test this (e.g. copy a note multiple times etc.) in the next to or three days. If no bug report comes from you on the weekend Arthur has additional confirmation that my changes don't need too much attention from him.

tomkahn commented 3 years ago

Just cloned two notes more than 10 times and had no issues. Should be fine to release. 👍

tomkahn commented 2 years ago

Maybe there is an issue after all. After deleting a few decks the collection I used before now does not sync and Anki tells me to check the database. If I do and try syncing again, the issue persists. I can send you the collection via email if you're interested.

ijgnd commented 2 years ago

I have no idea. I don't know this part of the anki code. You should keep your broken snapshot of the collection in case someone has an idea at some point. I'd check the database, maybe you'll get an informative error message, and see if similar errors occur over the coming weeks ...

soamsy commented 2 years ago

For what it's worth, I would also get issues where after copying notes and reviewing them, Anki would often tell me to check the database every time I tried to sync, with the only fix being to force a 1-way sync to the server. However, this stopped once I started using the change in #33, so the database/syncing issues you're seeing probably have little to do with ijgnd's changes.