anki: Can't get it to work

Hey Jason!

First, thanks for making this!

Second, I’m having some issues getting it to work. I wonder if you could add a “Quickstart” or “Getting Started” section to the README.md.

Here’s what I did:

  • opened up Anki (macOS)
  • installed the extension in my Foam workspace
  • installed AnkiConnect
  • ran command: Anki: Sync Anki
  • see error: “Failed to connect to Anki: Do you have Anki running?”
  • nothing happened
  • tried the command: Anki: Send to Deck

Here is the markdown file I had open when I tried (anki.md):

# Anki

## What does JS stand for?

JavaScript

## What is the best IDE/text editor for coding?

VS Code

I’m guessing there is something I’m missing. Any help would be appreciated! And happy to submit a PR to make it more clear in the README.md after.

additional info

Anki Version 2.1.14 (7b93e985) Qt 5.12.1 PyQt 5.11.3

I tried creating a new deck with called “notes” and doing the command “send to deck”

UPDATE

I was using an older version of Anki. I upgraded, but still nothing. Debug info from Anki below:

Anki 2.1.28 (7d8818f8) Python 3.8.0 Qt 5.15.0 PyQt 5.15.0
Platform: Mac 10.14.6
Flags: frz=True ao=True sv=1
Add-ons, last update check: 2020-07-27 19:23:22


===Add-ons (active)===
(add-on provided name [Add-on folder, installed at, version, is config changed])
AnkiConnect ['2055492159', 2020-07-27T18:48, 'None', '']
Auto Markdown ['1030875226', 2019-10-12T12:30, 'None', '']

===IDs of active AnkiWeb add-ons===
1030875226 2055492159

===Add-ons (inactive)===
(add-on provided name [Add-on folder, installed at, version, is config changed])

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 15 (8 by maintainers)

Most upvoted comments

It works now!!

image

Awesome! I don’t know why it didn’t upload the template the first time, but looks like it worked this time around.

Ok that was useful thanks! So It looks like the plugin was unable to upload the correct template and that’s why the cards are failing to show up. Even though the deck exists the template doesn’t so the cards can’t be uploaded.

I don’t know why the template wasn’t installed, it’s odd. It’s supposed to keep trying if it fails (as you may not have anki running when you use the plugin), then sets a flag once it succeeds.

the next version will have better logging and will attempt to upload it if it doesn’t exist, so hopefully we should get some useful output.

I’m going to add better logging so it can be debugged a bit more easily

Could you try deleting “notes” and running “send to deck” ?

Thanks for trying this out @jsjoeio Could you run the command with dev tools open (in VSCode, help, toggle dev tools) and see if anything shows up in there? Usually if the deck gets created but no content it could be because another deck has those same cards somewhere, are they unique? (I fixed this but it’s not in the release).

Btw Sync Anki just runs “sync” on your Anki instance, so if you get no error it most likely worked.