mortii / anki-morphs

A MorphMan fork rebuilt from the ground up with a focus on simplicity, performance, and a codebase with minimal technical debt.
https://mortii.github.io/anki-morphs/
Mozilla Public License 2.0
55 stars 8 forks source link

Error pressing L #69

Closed HQYang1979 closed 9 months ago

HQYang1979 commented 9 months ago

Error An error occurred. Please start Anki while holding down the shift key, which will temporarily disable the add-ons you have installed. If the issue only occurs when add-ons are enabled, please use the Tools > Add-ons menu item to disable some add-ons and restart Anki, repeating until you discover the add-on that is causing the problem. When you've discovered the add-on that is causing the problem, please report the issue to the add-on author. Debug info: Anki 23.10.1 (fac9e0ee) Python 3.9.15 Qt 6.6.0 PyQt 6.6.0 Platform: Windows-10-10.0.23590 Flags: frz=True ao=True sv=3 Add-ons, last update check: 2023-11-24 21:13:07 Add-ons possibly involved: ⁨ankimorphs-alpha⁩

Caught exception: Traceback (most recent call last): File "C:\Users\Administrator\AppData\Roaming\Anki2\addons21\472573498\reviewing_utils.py", line 237, in lambda: browse_same_morphs( File "C:\Users\Administrator\AppData\Roaming\Anki2\addons21\472573498\browser_utils.py", line 58, in browse_same_morphs card_ids = am_db.get_ids_of_cards_with_same_morphs(card_id, search_unknowns) File "C:\Users\Administrator\AppData\Roaming\Anki2\addons21\472573498\ankimorphs_db.py", line 247, in get_ids_of_cards_with_same_morphs raw_card_ids = self.con.execute( sqlite3.OperationalError: near "am": syntax error

mortii commented 9 months ago

Very interesting. I suspect you have a morph that accidentally produces sql syntax. We should sanitize the morph inputs for the query.

I'm not able to reproduce the problems with my cards. Is it possible for you to upload your cards somewhere for me to download?

HQYang1979 commented 9 months ago

Very interesting. I suspect you have a morph that accidentally produces sql syntax. We should sanitize the morph inputs for the query.

I'm not able to reproduce the problems with my cards. Is it possible for you to upload your cards somewhere for me to download?

the error message disappeared. Let me upload my collection here. https://pan.baidu.com/s/1brTYJcv0BNkioKOAKU3C8g?pwd=8sto

mortii commented 9 months ago

the error message disappeared.

if my assumption is correct then it depends on which card you used 'L' on.

If you go to Browse -> Today -> Studied you can then right click on cards -> Browse same morphs, and you might find which card produced the error.

This might be impractical if you studied a lot of cards today however....

HQYang1979 commented 9 months ago

I cannot reproduce the error, so... maybe just consider it closed.

mortii commented 9 months ago

Ok, let me know if it happens again!

github-actions[bot] commented 6 months ago

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.