krmanik / Sentence-Adder-Anki-Addon

Add sentences to Anki editor window in one click
GNU Affero General Public License v3.0
14 stars 6 forks source link

Error Message on Anki #1

Closed immunekang closed 3 years ago

immunekang commented 3 years 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 on the add-on support site. Debug info: Anki 2.1.42 (8eebfe18) Python 3.8.6 Qt 5.14.2 PyQt 5.14.2 Platform: Mac 10.16 Flags: frz=True ao=True sv=2 Add-ons, last update check: 2021-03-21 11:48:36 Add-ons possibly involved: ⁨Sentence adder for any language⁩ 
 Caught exception: Traceback (most recent call last): File "/Users/user/Library/Application Support/Anki2/addons21/1682655437/init.py", line 87, in createDB curs.execute( sqlite3.OperationalError: table examples already exists

krmanik commented 3 years ago

I have checked the error. It happens when you recreate the db for same language. For e.g. if you have created database for Japanese language from jpn_sentences.tsv and again try to create same db for that file then the error shows as it already exists.

To remove error do either of following

  1. Rename the tsv file and try again For e.g. rename jpn_sentences.tsv with jpn_sentences123.tsv

or

  1. Delete the generated language db from addons folder View lang_db in Sentence addon addons folder in Anki2 directory

In next update I will implement to handle these errors.

immunekang commented 3 years ago

Thank you