notion-anki-sync icon indicating copy to clipboard operation
notion-anki-sync copied to clipboard

Doesn't work – error when starting Anki

Open scheminger opened this issue 1 year ago • 4 comments

Thank you very much for creating and sharing this addon, seems like a gamechanger for me. I can't get it to work unfortunately. When I start Anki, this error pops up:

Anki 2.1.61 (0c1eaf4c) Python 3.9.15 Qt 6.3.2 PyQt 6.3.1
Platform: macOS-12.6.3-x86_64-i386-64bit
Flags: frz=True ao=True sv=2
Add-ons, last update check: 2023-04-25 22:48:25
Möglicherweise beteiligte Erweiterungen: ⁨Notion Toggles Loader⁩

Caught exception:
Traceback (most recent call last):
  File "/Users/fabeyyyyy/Library/Application Support/Anki2/addons21/1940767534/__init__.py", line 403, in run
    client.export_page(
  File "/Users/fabeyyyyy/Library/Application Support/Anki2/addons21/1940767534/notion_client.py", line 175, in export_page
    task_id = self.enqueue_export_task(page_id, recursive=recursive)
  File "/Users/fabeyyyyy/Library/Application Support/Anki2/addons21/1940767534/notion_client.py", line 110, in enqueue_export_task
    task_id = data['taskId']
KeyError: 'taskId'

Can you help me with this? Thank you in advance! 😊

scheminger avatar Apr 25 '23 21:04 scheminger

@sfelix1, thank you for the reporting! It seems that Notion changed some internals, but the addon should work now. Can you confirm?

9dogs avatar Apr 26 '23 08:04 9dogs

Thank you so much for the quick response! Works smoothly now 😊 I have another problem though. Because my toggles have sometimes overlapping names like e.g. "Cause", the wrong cards get overwritten. Is there a way to prevent this? Thanks again!

scheminger avatar Apr 26 '23 10:04 scheminger

Right now the add-on deduplicates cards by the toggle name. But how do you know which answer to give when presented with two cards with the same name?🤔

9dogs avatar Apr 26 '23 13:04 9dogs

I thought about using tags, or by creating a new field on the notion-anki-sync notetype and filling in manually. I write my notes for medicine by using one note per disease, because linking and searching is way easier that way and nothing gets laggy. When there are a lot of toggles and images in one page, Notion tends to get slow for me.

Edit: but I understood, that there is no identifier, so that doesn't help. It would be great if the note title would be synced too, or the toggles had some kind of identifier 🤔😊

scheminger avatar Apr 26 '23 16:04 scheminger