fonol / anki-search-inside-add-card

An add-on providing full-text-search and PDF reading functionality to Anki's Add card dialog
https://ankiweb.net/shared/info/1781298089
GNU Affero General Public License v3.0
178 stars 24 forks source link

Error after today's update(18 oct) #145

Closed Andriymac closed 3 years ago

Andriymac commented 3 years ago

After updating to the last version when I open Anki an error pops out:

Error log from anki ``` Debug info: Anki 2.1.22 (0ecc189a) Python 3.8.1 Qt 5.14.1 PyQt 5.14.1 Platform: Linux Flags: frz=True ao=True sv=1 Add-ons, last update check: 2020-10-18 22:05:54 Add-ons possibly involved: ⁨Searching PDF Reading Note-Taking in Add Dialog⁩ Caught exception: Traceback (most recent call last): File "/home/andrew/.local/share/Anki2/addons21/1781298089/src/index/indexing.py", line 99, in run self.t(*self.args) File "/home/andrew/.local/share/Anki2/addons21/1781298089/src/index/indexing.py", line 52, in _build_index index = FTSIndex(force_rebuild) File "/home/andrew/.local/share/Anki2/addons21/1781298089/src/index/fts_index.py", line 88, in __init__ corpus = get_notes_in_collection() File "/home/andrew/.local/share/Anki2/addons21/1781298089/src/index/indexing_data.py", line 43, in get_notes_in_collection oList = mw.col.db.all("select distinct notes.id, flds, tags, did, mid from notes left join cards on notes.id = cards.nid") File "anki/db.py", line 72, in all File "anki/db.py", line 33, in execute sqlite3.ProgrammingError: SQLite objects created in a thread can only be used in that same thread. The object was created in thread id 140627437446976 and this is thread id 140624420787968. ```
fonol commented 3 years ago

Huh, thanks for the report. I published an update which should fix the issue. You can test it by using "Rebuild Index" in the "Settings & Info" dropdown.

Andriymac commented 3 years ago

yeah, it works now. Thanks for a quick fix :+1: