Closed ram535 closed 4 years ago
Would you help run
(anki-query anki-query-decks)
and copy the results to me?
Is anki-browser
stop working as well?
anki-browser
is not working either.
(anki-query anki-query-decks)
result "^B"
Would you try run
sqlite3 collection.anki2 "SELECT decks FROM col"
under the collection folder? Besides, I tempory made a fix 4f1b68a.
Since official Anki Client will lock the database when it opens, which make anki.el can not read the database. Copy the database is for temporary reading.
I run sqlite3 collection.anki2 "SELECT decks FROM col"
but I do not have idea for what it is for?
I did not show any output. I mean I do not know if I should expect any output.
Since official Anki Client will lock the database when it opens, which make anki.el can not read the database. Copy the database is for temporary reading.
Sorry I do not know what you mean. Should I copy the database?
After updating, the error did not disappear.
Seems your database does not have the decks data, since col
column saves the decks information. It would be helpful if you share the database to me to further study.
I mean Anki.el copies the database to temp folder and read the copied file. Anki.el does not read the original database file. If your database does not have the col
column, it maybe the database corrupts.
I see, here is the database.
I used https://github.com/louietan/anki-editor to add content to my decks. To be able to add content to the decks, anki has to open and have the https://github.com/FooSoft/anki-connect#installation plugin.
One note here, if anki keeps open, it will lock the database, and any modification saves to a wal
and a shm
file. Only you close anki, the changes will be saved to collection.anki2
.
anki.el
only reads the copy of collection.anki2
.
I can not find a realible way to handle the wal
and shm
files so far. Therefore, if you want the changes applied and shown in anki.el
, you have to close anki.
Since the database can not sync between anki.el and anki in real time, it is difficult for me to handle some anki original data, such as the review logs.
Anki is very complicated and big, which makes people can not easily port the features. People tend to implement plugins rather than replica. Besides, I am not a fan of the original anki client, what I like is the deck resources and anki's editing card features. Therefore, anki.el will go lighter and will implement its own review feature in the future. Anki is only providing the database.
Actually, I already implemented the anki-connect feature to control the anki client to show and anwer the card. But anki connect is very slow, and keeps anki opening makes me distracted...
Nice, I like your approach. I am not a elisp hacker but if you need help testing stuff, I would gladly help.
When I have tested M-x anki
, anki was not opened.
Have you checked https://github.com/l3kn/org-fc, I think it has more futures than org-drill. For example org-fc has input cards (you type the answer) similar as anki does it.
The only thing that stop me from using org-fc is that I cannot use it in my phone
I am really happy that you provide supports and help!
By the way, I tested your collection.anki2
, seems it is corrupted, or may not supported in new anki? Which version of anki are you using? I am using Anki Version 2.1.15 (442df9d6).
I recommend you use the latest anki client to regenerate the database.
Or maybe your database format is too new....Your collection.anki2
version is 15. Mine is 11. Let me check...
I checked. Anki did change the database format in later versions. https://changes.ankiweb.net/#/
Changes
warning After using the latest version, if you wish to open your collection with an earlier Anki release, please go to the File>Switch Profile menu item, and click on “Downgrade & Quit”. If you skip this step, you may get an error message when opening your collection in an older Anki version, and you will need to return to this version, downgrade, then try again.
You have to downgrade the anki database and check again.
For latest database format, I may wait the stable anki client version come out first. Since the database is still new and does not have enough document for me to integrate.
Indeed that was the problem. I was using anki version 2.1.33
.
But it seems I do not need to install an older version.
If I do File>Switch Profile menu item, and click on “Downgrade & Quit”
.
M-x anki
works fine.
Could you post here or cut a release when the new database format is supported? I think I'd rather use the Anki app and wait until anki.el supports the new database format than have to downgrade my database.
Thanks for your work on this package!
确实很糟糕,这个包不支持哪个版本的 Anki 应该在 README 写清楚。花时间装上发现不支持,就是浪费时间了。
M-x anki
throw this messagejson-read: JSON readtable error: 2
.Debugging:
(setq debug-on-error t)