sirupsen/anki-airtable

Unclear instructions on setting up anki dependencies

stevenqzhang opened this issue · 6 comments

Setting up "aqt" and associated packages has been a challenge. Can you write something up about that?

Also, having a requirements.txt file would be useful.

Sorry, I missed this.

Did the instructions:

curl https://raw.githubusercontent.com/Sirupsen/anki-airtable/master/airtable.py \
  -o ~/Library/Application\ Support/Anki/User\ 1/addons/airtable.py
curl https://raw.githubusercontent.com/Sirupsen/anki-airtable/master/settings.example.json \
  -o ~/Library/Application\ Support/Anki/User\ 1/addons/settings.json

Not work for you? It'll sync when booting Anki.

Ah that makes so much more sense now!

I thought one was supposed to run

python airtable.py

Maybe numbered instructions in readme.md would make it more clear?

thanks!

okay I spoke too soon!

I'm hitting a few other errors now:

An error occurred in an add-on.
Please post on the add-on forum:
https://anki.tenderapp.com/discussions/add-ons

Traceback (most recent call last):
  File "aqt/progress.pyc", line 69, in handler
  File "aqt/main.pyc", line 110, in setupProfile
  File "aqt/main.pyc", line 244, in loadProfile
  File "anki/hooks.pyc", line 26, in runHook
  File "/Users/me/Documents/Anki/addons/airtable.py", line 172, in hook
    airtableImport(mw.col, table["anki_deck"], table["anki_model"], table["airtable_table"], table["airtable_view"], table["airtable_key"])
  File "/Users/me/Documents/Anki/addons/airtable.py", line 161, in airtableImport
    airtable.updateModel(model)
  File "/Users/me/Documents/Anki/addons/airtable.py", line 44, in updateModel
    for record in self.getRecords():
  File "/Users/me/Documents/Anki/addons/airtable.py", line 103, in getRecords
    json_response = json.loads(raw_response)
  File "json/__init__.pyc", line 338, in loads
  File "json/decoder.pyc", line 365, in decode
  File "json/decoder.pyc", line 383, in raw_decode
ValueError: No JSON object could be decoded

  1. Do the columns in the airtable have to line up with the deck model used in anki?

The error looks like an error response. Do you have the right API key and APP key configured in the JSON config file?

Do the columns in the airtable have to line up with the deck model used in anki?

You need to create a card, and then it'll create the rest of the fields by itself.

Bump, did you get it to work?

Sorry. Give me a few days; haven't gotten a chance to try it out yet (you can close the bug if you want and I'll reopen it if I encounter the problem again) Thanks!