Closed langfield closed 12 months ago
This happened again while testing a fix for spurious <br>
tags in field HTML. Possibly a race condition.
Unable to reproduce, will reopen if this issue persists.
@langfield I debugged this error a bit and found out it is a race condition in shutil.rmtree whenever a file is deleted inside a dir during deletion
Here is a pr which tries to fix it: https://github.com/python/cpython/pull/14064
You can reproduce it on macos on non-standard file systems, it happens when I use ki in my /tmp for example
@lukas-mertens Oh wow, perhaps I'll reopen it then! Thanks š
Incidentally, have you used this tool much? I'd love to get some feedback, although I am aware of many things that are currently broken. š I am in the process of a heavy rewrite of the integration tests to make it easier to write new ones.
There is also a branch that contains a Haskell rewrite, and a branch that contains something that parses database diffs from sqldiff
. My current plan is to fix the existing bugs in the python version and then jump back to the Haskell branch.
I am still working on it, even though it looks a little dead, haha. Feel free to watch progress on this PR.
@langfield Haven't used it much yet, but I was a user of CrowdAnki-Diff and developed a tool which allows users to do visual merge request reviews. So far, the idea seems pretty nice. One recommendation though: If possible, it would be nice if Anki could automatically perform a "ki pull" after every sync. This way my anki database is automatically backed up to git.
Oh that's sweet! I'd love to see this tool, if you could send a link!
You say "was", why do you no longer use CrowdAnki-Diff?
Hmmm well it's not really possible, since a pull
consists of a fetch
+ merge
, and merge
is a manual operation that git
can sometimes do automatically, as I'm sure you know. I could make it fetch
automatically, but it's out of scope for now as currently there's no interface between the two programs. š
Oh, that is not a problem. Just do a git fetch origin
, then a
git merge --no-commit --no-ff origin/<your-branch-name>
, check if it is successful and if it is, do a git merge --abort
. This way you will check if the pull is going to work without user-intervention ;)
If it isn't, just show the user a little banner in anki, that they have to perform it manually.
Here it is: https://gitlab.com/dodod/crowdanki-diff/-/tree/master
It is awful angular code I wrote in a night without much sleep. But don't waste your time on it for now. It could be adapted to ki as well, but I think a rewrite would be better than forking this tool. And I don't know how important such a thing is, given that Markdown is previewed by many git hosters anyways.
I stopped using CrowdAnki, because it wasn't robust enough. Sometimes it fucked up your database. I had hoped that ki would maybe be better regarding this, which is why I gave it a try.
Well ki will currently also mess up your database (though not too badly I hope, and also the automatic backup on every op is pretty robust), so feel free to wait until it's declared stable!
From: Lukas Mertens @.>
Sent: Thursday, August 24, 2023 6:29:21 PM
To: langfield/ki @.>
Cc: langfield @.>; Mention @.>
Subject: Re: [langfield/ki] Copytree raises an error on push
operation (Issue #12)
Oh, that is not a problem. Just do a git fetch origin, then a git merge --no-commit --no-ff origin/
Oh, that is not a problem. Just do a git fetch origin, then a
git merge --no-commit --no-ff origin/
If it isn't, just show the user a little banner in anki, that they have to perform it manually.
Here it is: https://gitlab.com/dodod/crowdanki-diff/-/tree/masterhttps://urldefense.com/v3/__https://gitlab.com/dodod/crowdanki-diff/-/tree/master__;!!KGKeukY!y8Mi_BCQDisErvFRDvu3zqiesGj59sKgdDjX-J_WzoLq0UECzqSwgMkmqR25EWjhwvN8tMHfSdeOYThuUChmjxsPqUMasQ$
It is awful angular code I wrote in a night without much sleep. But don't waste your time on it for now. It could be adapted to ki as well, but I think a rewrite would be better than forking this tool. And I don't know how important such a thing is, given that Markdown is previewed by many git hosters anyways.
I stopped using CrowdAnki, because it wasn't robust enough. Sometimes it fucked up your database. I had hoped that ki would maybe be better regarding this, which is why I gave it a try.
ā Reply to this email directly, view it on GitHubhttps://urldefense.com/v3/__https://github.com/langfield/ki/issues/12*issuecomment-1692496823__;Iw!!KGKeukY!y8Mi_BCQDisErvFRDvu3zqiesGj59sKgdDjX-J_WzoLq0UECzqSwgMkmqR25EWjhwvN8tMHfSdeOYThuUChmjxspnfeohA$, or unsubscribehttps://urldefense.com/v3/__https://github.com/notifications/unsubscribe-auth/AISQNI3A472MXL6VTWTL4BDXW7IUDANCNFSM53Z5YSWA__;!!KGKeukY!y8Mi_BCQDisErvFRDvu3zqiesGj59sKgdDjX-J_WzoLq0UECzqSwgMkmqR25EWjhwvN8tMHfSdeOYThuUChmjxtNW2ZSaw$. You are receiving this because you were mentioned.Message ID: @.***>
Seems irrelevant with recent scope reduction.
The following error happened on a fresh clone, when adding a deck using
convert.py
(from quizlet) and possibly as a result of not committing the new directory and contents. Was not able to reproduce.It should be noted that using Quizlet to Anki 2.1 Importer with audio support is a much better way of importing from quizlet than using
ki
.