**Before the error happened, I was. trying to upload new content to our Ankihub deck
Error message (don't change this)
Anki 23.12.1 (1a1d4d54) (ao)
Python 3.9.15 Qt 6.6.1 PyQt 6.6.1
Platform: Windows-10-10.0.19045
Traceback (most recent call last):
File "aqt.taskman", line 142, in _on_closures_pending
File "aqt.taskman", line 86, in <lambda>
File "aqt.taskman", line 106, in wrapped_done
File "C:\Users\Anthony-Desktop\AppData\Roaming\Anki2\addons21\1322529746\gui\suggestion_dialog.py", line 305, in <lambda>
on_done=lambda future: _on_suggest_notes_in_bulk_done(future, parent),
File "C:\Users\Anthony-Desktop\AppData\Roaming\Anki2\addons21\1322529746\gui\suggestion_dialog.py", line 391, in _on_suggest_notes_in_bulk_done
raise e
File "C:\Users\Anthony-Desktop\AppData\Roaming\Anki2\addons21\1322529746\gui\suggestion_dialog.py", line 379, in _on_suggest_notes_in_bulk_done
suggestions_result: BulkNoteSuggestionsResult = future.result()
File "concurrent.futures._base", line 439, in result
File "concurrent.futures._base", line 391, in __get_result
File "concurrent.futures.thread", line 58, in run
File "C:\Users\Anthony-Desktop\AppData\Roaming\Anki2\addons21\1322529746\gui\suggestion_dialog.py", line 297, in <lambda>
task=lambda: suggest_notes_in_bulk(
File "C:\Users\Anthony-Desktop\AppData\Roaming\Anki2\addons21\1322529746\main\suggestions.py", line 183, in suggest_notes_in_bulk
errors_by_nid_int = client.create_suggestions_in_bulk(
File "C:\Users\Anthony-Desktop\AppData\Roaming\Anki2\addons21\1322529746\ankihub_client\ankihub_client.py", line 960, in create_suggestions_in_bulk
errors_for_new_note_suggestions = self._create_suggestion_in_bulk_inner(
File "C:\Users\Anthony-Desktop\AppData\Roaming\Anki2\addons21\1322529746\ankihub_client\ankihub_client.py", line 987, in _create_suggestion_in_bulk_inner
raise AnkiHubHTTPError(response)
1322529746.ankihub_client.ankihub_client.AnkiHubHTTPError: AnkiHub request error: 500 Internal Server Error
Just noticed the logs show a different error code than the one in the postโs text. Can you check for add-on updates from Tools > Add-ons > Check for Updates then try again?
OK, I found the source of the error. PDF2-Anki is apparently generating large IDs that AnkiHub canโt handle and this was causing a database error. Please follow the steps to fix the issue:
Back up your collection to be safe using File > Create Backup.
Select all PDF2-Anki notes in the browser.
Open the debug console and paste the following code:
from anki.utils import guid64
from aqt import dialogs, mw
browser = dialogs.open("Browser", mw)
notes = []
for nid in browser.selected_notes():
note = mw.col.get_note(nid)
note.guid = guid64()
notes.append(note)
mw.col.update_notes(notes)