Can't sync or download decks from ankihub

Hi, new to AnkiHub. Whenever I try to download a deck I get this error message. I already tried disabling my add-ons. My Anki is version 2.1.65.

Anki 2.1.65 (aa9a734f) Python 3.9.15 Qt 6.5.0 PyQt 6.5.0
Platform: macOS-13.3.1-x86_64-i386-64bit
Flags: frz=True ao=True sv=3
Add-ons, last update check: 2023-09-08 21:35:45

Traceback (most recent call last):

  File "/Users/tobiasnovacek/Library/Application Support/Anki2/addons21/1322529746/gui/operations/deck_installation.py", line 103, in _download_and_install_decks_inner
    result.append(_download_and_install_single_deck(ah_did))

  File "/Users/tobiasnovacek/Library/Application Support/Anki2/addons21/1322529746/gui/operations/deck_installation.py", line 122, in _download_and_install_single_deck
    notes_data: List[NoteInfo] = AnkiHubClient().download_deck(

  File "/Users/tobiasnovacek/Library/Application Support/Anki2/addons21/1322529746/ankihub_client/ankihub_client.py", line 602, in download_deck
    notes_data_raw = [row for row in reader]

  File "/Users/tobiasnovacek/Library/Application Support/Anki2/addons21/1322529746/ankihub_client/ankihub_client.py", line 602, in <listcomp>
    notes_data_raw = [row for row in reader]

  File "csv", line 111, in __next__

_csv.Error: field larger than field limit (131072)


The above exception was the direct cause of the following exception:


Traceback (most recent call last):

  File "aqt.taskman", line 122, in _on_closures_pending

  File "aqt.taskman", line 71, in <lambda>

  File "aqt.taskman", line 90, in wrapped_done

  File "/Users/tobiasnovacek/Library/Application Support/Anki2/addons21/1322529746/gui/operations/deck_installation.py", line 40, in on_install_done
    on_done(future_with_exception(e))

  File "/Users/tobiasnovacek/Library/Application Support/Anki2/addons21/1322529746/gui/operations/ankihub_sync.py", line 55, in <lambda>
    on_done=lambda future: on_new_deck_subscriptions_done(

  File "/Users/tobiasnovacek/Library/Application Support/Anki2/addons21/1322529746/gui/operations/ankihub_sync.py", line 24, in on_new_deck_subscriptions_done
    on_done(future_with_exception(future.exception()))

  File "/Users/tobiasnovacek/Library/Application Support/Anki2/addons21/1322529746/gui/menu.py", line 429, in on_done
    future.result()

  File "concurrent.futures._base", line 439, in result

  File "concurrent.futures._base", line 391, in __get_result

  File "/Users/tobiasnovacek/Library/Application Support/Anki2/addons21/1322529746/gui/operations/deck_installation.py", line 38, in on_install_done
    import_results: List[AnkiHubImportResult] = 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 "/Users/tobiasnovacek/Library/Application Support/Anki2/addons21/1322529746/gui/operations/deck_installation.py", line 86, in <lambda>
    task=lambda: _download_and_install_decks_inner(ankihub_dids),

  File "/Users/tobiasnovacek/Library/Application Support/Anki2/addons21/1322529746/gui/operations/deck_installation.py", line 115, in _download_and_install_decks_inner
    raise exceptions[0]

1322529746.gui.exceptions.DeckDownloadAndInstallError: Error while downloading and installing deck 586d9d05-8801-4074-b06b-78bffb71e360: field larger than field limit (131072)

Would be very grateful for any suggestions, cheers.

First try restarting your device and trying again.

If that does not fix it, try deleting the ankihub addon and reinstalling and see if it still persists

The deck appears to be exceeding some limit on AnkiHub. We’ll investigate this further and get back to you.

1 Like

This error is coming from the csv module:

Thanks for the quick reply, any idea how I could solve this?

The simplest solution is to unsubscribe from the Zankiphil - Klinik deck for now.

If you really need the deck now though (and feeling adventurous), this should allow you to import it:

  1. Go to Tools > Add-ons, select the AnkiHub add-on, and click View Files.
  2. Find the ankihub_client/ankihub_client.py file and open it in a text editor.
  3. At the top you after the import csv line, paste the following two lines:
import sys
csv.field_size_limit(sys.maxsize)

image
4. Save the file, restart Anki, and try importing the deck again.

1 Like

Thank you, I’ll try it later today :slight_smile:

1 Like

The issue is triggered by a note (nid:1686703150701) that has 1346 tags! Sign In

Thanks for the heads up. We will fix the card asap.
-Zankiphil Maintainer team

3 Likes

**Before the error happened, I updatet Anki to 2.1.66 and then downloaded the anki hub addon. I tried to download other decks from anki hub and it worked, but for the Zankiphil deck I had this error:

Error message (don't change this)
Anki 2.1.66 (70506aeb) Python 3.9.15 Qt 6.5.2 PyQt 6.5.2
Platform: Windows-10-10.0.22621
Flags: frz=True ao=True sv=2
Add-ons, last update check: 2023-09-12 11:57:41

Traceback (most recent call last):

  File "C:\Users\tester\AppData\Roaming\Anki2\addons21\1322529746\gui\operations\deck_installation.py", line 103, in _download_and_install_decks_inner
    result.append(_download_and_install_single_deck(ah_did))

  File "C:\Users\tester\AppData\Roaming\Anki2\addons21\1322529746\gui\operations\deck_installation.py", line 122, in _download_and_install_single_deck
    notes_data: List[NoteInfo] = AnkiHubClient().download_deck(

  File "C:\Users\tester\AppData\Roaming\Anki2\addons21\1322529746\ankihub_client\ankihub_client.py", line 602, in download_deck
    notes_data_raw = [row for row in reader]

  File "C:\Users\tester\AppData\Roaming\Anki2\addons21\1322529746\ankihub_client\ankihub_client.py", line 602, in <listcomp>
    notes_data_raw = [row for row in reader]

  File "csv", line 111, in __next__

_csv.Error: field larger than field limit (131072)


The above exception was the direct cause of the following exception:


Traceback (most recent call last):

  File "aqt.taskman", line 122, in _on_closures_pending

  File "aqt.taskman", line 71, in <lambda>

  File "aqt.taskman", line 90, in wrapped_done

  File "C:\Users\tester\AppData\Roaming\Anki2\addons21\1322529746\gui\operations\deck_installation.py", line 40, in on_install_done
    on_done(future_with_exception(e))

  File "C:\Users\tester\AppData\Roaming\Anki2\addons21\1322529746\gui\operations\ankihub_sync.py", line 56, in <lambda>
    on_done=lambda future: on_new_deck_subscriptions_done(

  File "C:\Users\tester\AppData\Roaming\Anki2\addons21\1322529746\gui\operations\ankihub_sync.py", line 24, in on_new_deck_subscriptions_done
    on_done(future_with_exception(future.exception()))

  File "C:\Users\tester\AppData\Roaming\Anki2\addons21\1322529746\gui\auto_sync.py", line 74, in sync_with_ankiweb
    future.result()

  File "concurrent.futures._base", line 439, in result

  File "concurrent.futures._base", line 391, in __get_result

  File "C:\Users\tester\AppData\Roaming\Anki2\addons21\1322529746\gui\operations\deck_installation.py", line 38, in on_install_done
    import_results: List[AnkiHubImportResult] = 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\tester\AppData\Roaming\Anki2\addons21\1322529746\gui\operations\deck_installation.py", line 86, in <lambda>
    task=lambda: _download_and_install_decks_inner(ankihub_dids),

  File "C:\Users\tester\AppData\Roaming\Anki2\addons21\1322529746\gui\operations\deck_installation.py", line 115, in _download_and_install_decks_inner
    raise exceptions[0]

1322529746.gui.exceptions.DeckDownloadAndInstallError: Error while downloading and installing deck 586d9d05-8801-4074-b06b-78bffb71e360: field larger than field limit (131072)

Sentry link (for developers)

@nephroboy @jonathan_strohm
The fix is online. Please give it another try. Installing the Deck should work fine now. Thanks for the report.

Oh @abdo.nh please mind the potential OverflowError your snippet produces (in case you want to push that to the addon)

2 Likes

Someone hit that error already: Specific Deck can not be downloaded - #4 by papenbro

We won’t increase the field length limit for now (I thought the deck had a legitimate need for huge fields).

2 posts were merged into an existing topic: Downloading deck dialogue forever, stuck