Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Andreilys opened this issue Mar 22, 2020 · 5 comments
Open

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

Andreilys opened this issue Mar 22, 2020 · 5 comments

Comments

@Andreilys
Copy link

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

@mkrcah
Copy link
Contributor

mkrcah commented Mar 31, 2020

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

@sirupsen
Copy link
Owner

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!

@mkrcah
Copy link
Contributor

mkrcah commented Mar 31, 2020

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

@sirupsen
Copy link
Owner

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

@iandanforth
Copy link

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.

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

No branches or pull requests

4 participants