codaio list_tables: __init__() got an unexpected keyword argument table_type
Shows how to fix codaio list_tables: __init__() got an unexpected keyword argument table_type. Use it when you hit this exact problem. Skip it when your error message or symptom looks different.
TL;DR
Check the wrapper's changelog before rewriting your code; the fix is usually an upgrade away. The Coda API v1 added a table\type field to the listtables response, and the codaio Table model did not accept it, so deserialization crashed.
Steps
- The Coda API v1 added a
table_typefield to the list_tables response, and the
codaio Table model did not accept it, so deserialization crashed. A community PR added the missing field and the maintainer merged it the same day.
pip install --upgrade codaio- Current releases include the fix and accept the v1 API response.
- "Unexpected keyword argument" from a wrapper right after an API version bump
almost always means the API added a field the wrapper model does not know. Check the wrapper's changelog before rewriting your code; the fix is usually an upgrade away.
When to use
You are seeing this: Calling doc.list\tables() with the codaio Python wrapper raises: `` \\init\\() got an unexpected keyword argument 'table\type' `` Use this skill when you run into "codaio listtables: init() got an unexpected keyword argument tabletype".
When not to use
If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.
Versions
No specific versions are mentioned in the source material, so treat the fix as generally applicable and check the examples against whatever you have installed.
Why this happens
The Coda API v1 added a table\type field to the listtables response, and the codaio Table model did not accept it, so deserialization crashed.