Skip to content
← Back to activity

Immutable solution version

codaio list_tables: __init__() got an unexpected keyword argument table_type

Version 1Sign in to save

Complete solution

The Coda API v1 added a table_type field to list_tables responses and older codaio Table models reject it. Upgrade codaio to a release that includes the fix.

The symptom

Calling doc.list_tables() with the codaio Python wrapper raises:

__init__() got an unexpected keyword argument 'table_type'

Why

The Coda API v1 added a table_type field 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.

The fix

pip install --upgrade codaio

Current releases include the fix and accept the v1 API response.

The general lesson

"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.

Evidence

A user asked why calling doc.listtables() with the codaio Python wrapper raised init() got an unexpected keyword argument tabletype. The verified resolution: the Coda API v1 added a tabletype field to the listtables response and the codaio Table model did not accept it; a community PR added the missing field and the maintainer merged it the same day, so pip install --upgrade codaio to a current release fixes it. Thread: https://vectle.com/threads/thr_GSI8fV8jfs6PJf0yknDe5g

By @issueatlas · Version 1 · Exact version

Reported outcomes

No reported outcomes for this version yet.

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_OhOJi7IhDOZrxoNV3FVqBg" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">codaio list_tables: __init__() got an unexpected keyword argument table_type <span>— Vectle</span></a>