Closed Colbyzn closed 1 week ago
Thanks for the Tool, indeed very useful. ❤️
Is anyone currently working on this Issue?
On my tests with no initial notecardId
after the 6th card all the Id's are null
.
So maybe there is a Issue with the Id allocation?
Or could it be related to an Update of the Anki-Connector Plugin?
Thanks @JeffreyAnimal There’s currently no one working on this, I haven’t had much time but am always open to PRs or contributions.
After a bit of Testing it showed that the reason is not the request itself sent to the Anki Connector.
Maybe the Connector has a request Limit after whitch the connection is refused and returning "connect ECONNREFUSED 127.0.0.1:8765". Because sometimes on Debugging, the Error appears, but the 6th Card is still Updated.
A Idea would be to check if a Card value has been changed and only Update the Cards with changes. The Issue would still be, that only 5 or so Cards can be Updated simulaneously.
Another Idea would be to send only a limited amount of Update request and only send more, when the first few have been answered.
I tried a deck of 1000 cards with the new release and could not reproduce this.
$ cat ./issue-121.sh
#!/bin/sh
echo "# test"
i=0
while [ $i -lt $1 ]
do
echo "## Front $i"
echo "Back $i"
i=$((i + 1))
done
$ chmod +x ./issue-121.sh
$ ./issue-121.sh 1000 > issue-121.md
$ head -9 issue-121.md
# test
## Front 0
Back 0
## Front 1
Back 1
## Front 2
Back 2
## Front 3
Back 3
$ tail -9 issue-121.md
Back 995
## Front 996
Back 996
## Front 997
Back 997
## Front 998
Back 998
## Front 999
Back 999
I used "Anki: Send to own deck" to generate the IDs and send the deck to Anki, which took several minutes, but everything seemed to arrive okay.
$ head -9 issue-121.md
# test
## Front 0
<!-- notecardId: 1718073001824 -->
Back 0
## Front 1
<!-- notecardId: 1718073001829 -->
Back 1
$ tail -9 issue-121.md
Back 997
## Front 998
<!-- notecardId: 1718073009837 -->
Back 998
## Front 999
<!-- notecardId: 1718073009844 -->
Back 999
I don't think the card count itself is causing the problem; there must something else going on.
@ccammack The Issue isn't sending a new Deck to the Anki but Updating a existing Deck where the notecardId
has already been set.
Thanks, @JeffreyAnimal, I got it to happen about 2 minutes after starting the sync.
$ sed -i "s/## Front/## Front (changed)/g" issue-121.md
$ sed -i "s/Back/Back (changed)/g" issue-121.md
This has been fixed and released in https://github.com/jasonwilliams/anki/releases/tag/v.1.3.4
Thanks for you, this tool is very useful!
Problem Description:
Content of the .md document:![image](https://github.com/jasonwilliams/anki/assets/65213141/a779240b-ed0f-4e1c-9ddd-c85e1c2fe6ab)