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

PDF does not import. #144

Closed mumtazi closed 3 years ago

mumtazi commented 3 years ago

Hi!

I have recently updated the extension, and now whenever I try to import any pdf, it shows an error as such:

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.26 (70784154) 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-10-15 11:08:04

Caught exception: Traceback (most recent call last): File "<C:\Program Files\Anki\decorator.pyc:decorator-gen-38>", line 2, in dropEvent File "lib\site-packages\anki\hooks.py", line 638, in decorator_wrapper File "lib\site-packages\anki\hooks.py", line 635, in repl File "C:\Users\mumta\AppData\Roaming\Anki2\addons21\1781298089\src__init.py", line 142, in webview_on_drop expanded_on_bridge_cmd(None, f"siac-create-note-source-prefill {url}", editor) File "C:\Users\mumta\AppData\Roaming\Anki2\addons21\1781298089\src\command_parsing.py", line 516, in expanded_on_bridge_cmd NoteEditor(self.parentWindow, add_only=False, read_note_id=None, tag_prefill = None, source_prefill=source) File "C:\Users\mumta\AppData\Roaming\Anki2\addons21\1781298089\src\dialogs\editor.py", line 147, in init self.setup_ui() File "C:\Users\mumta\AppData\Roaming\Anki2\addons21\1781298089\src\dialogs\editor.py", line 180, in setup_ui self.create_tab = CreateTab(self) File "C:\Users\mumta\AppData\Roaming\Anki2\addons21\1781298089\src\dialogs\editor.py", line 404, in init self.slider = QtPrioritySlider(self.parent.priority, self.parent.note_id, schedule=schedule) File "C:\Users\mumta\AppData\Roaming\Anki2\addons21\1781298089\src\dialogs\components.py", line 44, in init__ self.avg_prio = round(get_avg_priority(), 1) TypeError: type NoneType doesn't define round method

Can you please let me know how I can import my PDFs?

Thank you.

hoangpdang578 commented 3 years ago

I am facing same situation right now.!

fonol commented 3 years ago

thanks for the reports, patch is up!

mumtazi commented 3 years ago

Thank you! I admire your speed and efficiency!