louietan / anki-editor

Emacs minor mode for making Anki cards with Org
705 stars 87 forks source link

Submit error #14

Open peng051410 opened 6 years ago

peng051410 commented 6 years ago

I use you sample org file to submit, got error: Fetching decks... anki-editor-insert-deck: Unexpected error communicating with AnkiConnect: End of file while parsing JSON, the response was ""

What should i do?

peng051410 commented 6 years ago

My environment is: MacOs 10.13.4 (17E199)

peng051410 commented 6 years ago

My curl show: image

louietan commented 6 years ago

Have you carried out the instructions given in https://foosoft.net/projects/anki-connect/#notes-for-mac-os-x-users ?

louietan commented 6 years ago

And make sure the decks you submit already exist in your Anki collection.

peng051410 commented 6 years ago

Yes,I execute the https://foosoft.net/projects/anki-connect/#notes-for-mac-os-x-users command, and the deck in the anki collection

peng051410 commented 6 years ago

image

louietan commented 6 years ago

What are the results of evaluating the following expressions ?

peng051410 commented 6 years ago

execute anki-editor-anki-connect-listening-address result: 127.0.0.1 execute anki-editor-anki-connect-listening-port result: 8765 (anki-editor--anki-connect-invoke "deckNames" 5) get error: json parse error, response war ""

peng051410 commented 6 years ago

Is there a way for me to add some key log prints to your program?

louietan commented 6 years ago

You may have to clone this repo to your local machine and debug the anki-editor--anki-connect-invoke function to see what's wrong with the invocation of shell-command-to-string which uses curl to send the request.