sirupsen/anki-airtable

TypeError: write() argument must be str, not bytes

Andreilys opened this issue · 5 comments

Hey @sirupsen for taking the time to create this extension. Haven't used Anki or Airtable before so I'm likely missing a step somewhere, do you know what might be causing this issue? Looks like my Anki model/airtable should line up but I"m getting a write error.

Screen Shot 2020-03-22 at 11 31 42 AM

Screen Shot 2020-03-22 at 11 33 01 AM

Screen Shot 2020-03-22 at 11 34 19 AM

Caught exception:
Traceback (most recent call last):
File "aqt/progress.py", line 76, in handler
File "aqt/main.py", line 195, in setupProfile
File "aqt/main.py", line 370, in loadProfile
File "aqt/gui_hooks.py", line 1281, in call
File "anki/hooks.py", line 611, in runHook
File "/Users/andreilyskov/Library/Application Support/Anki2/addons21/1573217784/init.py", line 186, in hook
airtableImport(mw.col, table["anki_deck"], table["anki_model"], table["airtable_table"], table["airtable_view"], table["airtable_key"])
File "/Users/andreilyskov/Library/Application Support/Anki2/addons21/1573217784/init.py", line 175, in airtableImport
airtable.updateModel(model)
File "/Users/andreilyskov/Library/Application Support/Anki2/addons21/1573217784/init.py", line 39, in updateModel
for record in self.getRecords():
File "/Users/andreilyskov/Library/Application Support/Anki2/addons21/1573217784/init.py", line 92, in getRecords
self.records = self.getRecordsWithOffset(None)
File "/Users/andreilyskov/Library/Application Support/Anki2/addons21/1573217784/init.py", line 109, in getRecordsWithOffset
sys.stderr.write(raw_response)
File "aqt/errors.py", line 48, in write
TypeError: write() argument must be str, not bytes

I'm receiving the same error. @Andreilys Have you managed to figure it out?

I haven't used the plugin for a while, and don't actively use it anymore, please let me know if you figure this out!

@sirupsen out of curiosity, what has changed? have you moved away from Airtable or stopped using Anki altogether?

I don't use Airtable much anymore. Anki and plain-text these days.

I've dug into this a bit and at a high level is seems that Anki 2.1.4+ has broken this add-on. Downgrading to 2.1.35 resolved this error for me.