Skip to content
This repository has been archived by the owner on Dec 31, 2023. It is now read-only.

Confusing error message #406

Open
Madoshakalaka opened this issue Oct 6, 2023 · 1 comment
Open

Confusing error message #406

Madoshakalaka opened this issue Oct 6, 2023 · 1 comment

Comments

@Madoshakalaka
Copy link

Hi, new user and absolutely love this project. However, this error message is confusing.
It says "cannot create note because it is empty"

But in this case, the creation fails because of a mismatch of field names. It took me a while to realize.

My fields are not called "Front" and "Back".

Traceback (most recent call last):
  File "c:\Users\Matt\Desktop\ankigen\main.py", line 22, in <module>
    result = invoke('addNote', note={"deckName": "日本語", "modelName": "Japanese", "fields":{"Front": "what da dog doing", "Back":"bark bark"}})
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^   
  File "c:\Users\Matt\Desktop\ankigen\main.py", line 19, in invoke
    raise Exception(response['error'])
Exception: cannot create note because it is empty
@doomdagadiggiedahdah
Copy link

Can you paste the code you're using?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants