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

information exchange #91

Closed dumbdreamed closed 4 years ago

dumbdreamed commented 4 years ago

hi, my friend. I'm the one you told to exchange some information on the review page, again thanks for your efforts on this add on, it is amazing. I have this error Anki 2.1.22 (0ecc189a) Python 3.8.0 Qt 5.14.1 PyQt 5.14.1 Platform: Windows 10 Flags: frz=True ao=True sv=1 Add-ons, last update check: 2020-05-03 15:14:33

Caught exception: Traceback (most recent call last): File "C:\Users\孙晋响\AppData\Roaming\Anki2\addons21\1781298089\src\index\indexing.py", line 238, in run self.t(*self.args) File "C:\Users\XXX\AppData\Roaming\Anki2\addons21\1781298089\src\index\indexing.py", line 100, in _build_index index = FTSIndex(corpus, index_up_to_date) File "C:\Users\XXX\AppData\Roaming\Anki2\addons21\1781298089\src\index\fts_index.py", line 79, in init conn.execute("drop table if exists notes") sqlite3.OperationalError: database is locked and I deleted this "earch-data.db" file as you told but it didnt worked

fonol commented 4 years ago

Hi, thanks for posting the error here.

  1. Have you updated your Anki version before the error happened?
  2. Would you mind updating to the newest Anki version? There is a newer version of the add-on that only works for Anki versions >= 2.1.24. You have 2.1.22.
dumbdreamed commented 4 years ago

hi, yes, I updated my anki to 2.1.25 before this happened. I uninstalled it and installed it again with the latest version but unfortunately, the problem still exists. An add-on you installed failed to load. If problems persist, please go to the Tools>Add-ons menu, and disable or delete the add-on.

When loading '⁨Searching PDF Reading Note-Taking in Add Dialog⁩': ⁨Traceback (most recent call last): File "aqt\addons.py", line 211, in loadAddons File "C:\Users\dumbdreamed\AppData\Roaming\Anki2\addons21\1781298089__init.py", line 4, in from . import src File "C:\Users\dumbdreamed\AppData\Roaming\Anki2\addons21\1781298089\src__init__.py", line 355, in init_addon() File "C:\Users\dumbdreamed\AppData\Roaming\Anki2\addons21\1781298089\src__init__.py", line 67, in init_addon create_db_file_if_not_exists() File "C:\Users\dumbdreamed\AppData\Roaming\Anki2\addons21\1781298089\src\notes.py", line 163, in create_db_file_if_not_exists persist_notes_db_checked() File "C:\Users\dumbdreamed\AppData\Roaming\Anki2\addons21\1781298089\src\debug_logging.py", line 72, in persist_notes_db_checked c_json = _get_data_file_content() File "C:\Users\dumbdreamed\AppData\Roaming\Anki2\addons21\1781298089\src\debug_logging.py", line 92, in _get_data_file_content return json.load(json_file) File "json\init.py", line 293, in load File "json\init__.py", line 357, in loads File "json\decoder.py", line 337, in decode File "json\decoder.py", line 355, in raw_decode json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

fonol commented 4 years ago

I updated the add-on, can you try it again?

dumbdreamed commented 4 years ago

really thanks my friend but it still gives me an error. An add-on you installed failed to load. If problems persist, please go to the Tools>Add-ons menu, and disable or delete the add-on.

When loading '⁨Searching PDF Reading Note-Taking in Add Dialog⁩': ⁨Traceback (most recent call last): File "aqt\addons.py", line 211, in loadAddons File "C:\Users\dumbdreamed\AppData\Roaming\Anki2\addons21\1781298089__init.py", line 4, in from . import src File "C:\Users\dumbdreamed\AppData\Roaming\Anki2\addons21\1781298089\src__init__.py", line 363, in init_addon() File "C:\Users\dumbdreamed\AppData\Roaming\Anki2\addons21\1781298089\src__init__.py", line 67, in init_addon create_db_file_if_not_exists() File "C:\Users\dumbdreamed\AppData\Roaming\Anki2\addons21\1781298089\src\notes.py", line 163, in create_db_file_if_not_exists persist_notes_db_checked() File "C:\Users\dumbdreamed\AppData\Roaming\Anki2\addons21\1781298089\src\debug_logging.py", line 72, in persist_notes_db_checked c_json = _get_data_file_content() File "C:\Users\dumbdreamed\AppData\Roaming\Anki2\addons21\1781298089\src\debug_logging.py", line 92, in _get_data_file_content return json.load(json_file) File "json\init.py", line 293, in load File "json\init__.py", line 357, in loads File "json\decoder.py", line 337, in decode File "json\decoder.py", line 355, in raw_decode json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

dumbdreamed commented 4 years ago

I disabled all of the other add sons. but still gives me an error

fonol commented 4 years ago

Okay, another try: Update your add-on to the newest version, then go into its user_files folder, delete the data.json file, and try again.

dumbdreamed commented 4 years ago

really really thanks my friend for your efforts. its workinnnnnggg! may I ask how much time took for you to learn python and from what source you have learnt it?

fonol commented 4 years ago

I don't really remember when exactly I learned it, I think it was in the university some years ago. Glad it's working now!