smoothbrain-ai / smoothbrain-anki

SmoothBrain is an Anki plugin that fetches Readwise highlights and makes flashcards using OpenAI GPT.
41 stars 6 forks source link

ValueError: not enough values to unpack (expected 2, got 1) #47

Open quinn-p-mchugh opened 10 months ago

quinn-p-mchugh commented 10 months ago

Hi there,

After running the plugin via the Sync Readwise button, I get the following error:

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 to the add-on author.
Debug info:
Anki 23.10.1 (fac9e0ee) Python 3.9.15 Qt 6.6.0 PyQt 6.6.0
Platform: Windows-10-10.0.22621
Flags: frz=True ao=True sv=3
Add-ons, last update check: 2023-12-19 11:50:42
Add-ons possibly involved: ⁨smoothbrain-anki-master⁩

Caught exception:
Traceback (most recent call last):
  File "aqt.taskman", line 138, in _on_closures_pending
  File "aqt.taskman", line 82, in <lambda>
  File "aqt.operations", line 260, in wrapped_done
  File "C:\Users\Quinn\AppData\Roaming\Anki2\addons21\smoothbrain-anki-master\__init__.py", line 114, in update_card
    question, answer = completion.split("A:")
ValueError: not enough values to unpack (expected 2, got 1)

The root cause is probably difficult to identify without knowing what specific Readwise highlight was ingested by ChatGPT. If this is the case, I'd be happy to do some additional digging.