jolly-crimson•17mo ago
Getting an Error trying to Reset Database with Migaku Kanji God Add-on
I am trying to reset my database for the Migaku Kanji God Add-on. I click on Kanji > Settings > General > Reset Database. Then Anki gives me an error popup. Here is the debug info.
I'm not sure how relevant it is, but I am on Windows 10 when the debug info says windows 11.
It also doesn't say in the debug message but in the about section for the Add On, it says it's version 1.2.0

20 Replies
unwilling-turquoise•17mo ago
I think someone just forgot to use
QMesageBox.StandardButton.No
@Migaku Kanji Addon Supportjolly-crimsonOP•17mo ago
i think so too, i tried adding it myself but i don't know how to recompile the addon
unwilling-turquoise•17mo ago
jolly-crimsonOP•17mo ago
i don't think that's it, unless I'm missing something, that just says how to organize your zip file for distributing your own addons, not how to recompile one that you've downloaded from ankiweb
unwilling-turquoise•17mo ago
oh, no.
Anki addons mostly are python scripts
You should edit the source code
GitHub
GitHub - migaku-official/Migaku-Kanji-Addon: Learn kanji within the...
Learn kanji within the context of the vocab in your Anki collection. Comes with a powerful lookup browser. - GitHub - migaku-official/Migaku-Kanji-Addon: Learn kanji within the context of the vocab...
jolly-crimsonOP•17mo ago
lol, you mean like make a PR to fix the change?
i tried doing it locally and it didn't do anything
unwilling-turquoise•17mo ago
You can make a PR or create .ankiaddon for yourself

jolly-crimsonOP•17mo ago
hmm, maybe i'll try that later, seems like a lot of work considering i've never done it before
even if it's relatively simple
unwilling-turquoise•17mo ago
GitHub
Migaku-Kanji-Addon/.github/workflows/build.yml at main · migaku-off...
Learn kanji within the context of the vocab in your Anki collection. Comes with a powerful lookup browser. - migaku-official/Migaku-Kanji-Addon
jolly-crimsonOP•17mo ago
that script looks like it just uploads for public release, unless i'm missing something in the workflow, it doesn't look like it builds it, rn i'm under the impression that it's built when you add it on anki
i think the only way would be to fork it, make the change, then add it as a separate add on, tho again, i'll try later, not now
unwilling-turquoise•17mo ago
It is all build steps. You don't need to upload anything
You can install .ankiaddon directly into anki

unwilling-turquoise•17mo ago
@Sir can you try this one?
unwilling-turquoise•17mo ago
Versioning here definitely isn't right (1.2.0 -> 1.21 😅 ), but I hope it should work
jolly-crimsonOP•17mo ago
yes, that fixed the bug, I really appreciate you taking the time to help
is the only change you made to the code adding the ".standardButton"?
also do you think you'll make a PR with those fixes? if not I might
unwilling-turquoise•17mo ago
Exactly, I changed it only in 2 places ( choices and default choice )
This problem may also occur in reseting custom stories/keywords
Can you check it please?

jolly-crimsonOP•17mo ago
I'll check after work, from a quick glance, I did notice it in a few other places in the same file
unwilling-turquoise•17mo ago
It's below on_reset_db function
I have changed only reset_db, so that's why i'm asking about other ones (I have cheked anki addon by code and I haven't this problem, so I can't reproduce unfortunetly )


jolly-crimsonOP•17mo ago
oh sorry, i misunderstood, I also only checked the code lol, I just checked Anki and there is a similar problem with Reset Custom Keywords and Reset Custom Stories
unwilling-turquoise•17mo ago
Then I will change every QmessageBox.No to use StandardButton and hope that my pull request will be accepted
fair-rose•17mo ago
@Henrik (JST)