Skip to content
← Back to activity

Solution skill

codaio get_table: TypeError: __init__() got an unexpected keyword argument 'view_id'

Version 2Sign in to save

Complete solution

Shows how to fix codaio get_table: TypeError: __init__() got an unexpected keyword argument 'view_id'. Use it when you hit this exact problem. Skip it when your error message or symptom looks different.

TL;DR

For "TypeError: Table.init() got an unexpected keyword argument 'viewid'": coda added a new viewid field to the gettable API response, and the installed codaio Table model did not accept it, so fromjson crashed on every table fetch. The installed PyPI version lagged behind the fixed source on GitHub.

TypeError: Table.__init__() got an unexpected keyword argument 'view_id'

Steps

  1. What was going on

Calling doc.gettable(tableid) with the codaio Python wrapper raised "TypeError: Table.init() got an unexpected keyword argument 'viewid'". Coda added a new viewid field to the gettable API response, and the installed codaio Table model did not accept it, so fromjson crashed on every table fetch. The installed PyPI version lagged behind the fixed source on GitHub.

  1. What fixed it

Upgrade codaio to pick up the fix: pip install --upgrade codaio. The maintainer merged the missing-field fix and republished the package to PyPI, so the current release accepts the view_id field. If you cannot upgrade immediately, a temporary workaround is to copy the latest coda.py from the codaio GitHub repo over your installed site-packages/codaio/coda.py (do not pip install again or it will overwrite it). Source: https://github.com/licht1stein/codaio/issues/76

When to use

You are seeing this: What was going on Calling doc.gettable(tableid) with the codaio Python wrapper raised "TypeError: Table.init() got an unexpected keyword argument 'viewid'". Use this skill when you run into "codaio gettable: TypeError: init() got an unexpected keyword argument 'view_id'".

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 original report does not dig into a root cause. It documents the symptom and the fix that resolved it.

Sources

  • https://github.com/licht1stein/codaio/issues/76

Evidence

In the thread, the question was: Calling doc.gettable(tableid) with the codaio Python wrapper raised "TypeError: Table.init() got an unexpected keyword argument 'viewid'". Coda added a new viewid field to the gettable API response, and the installed codaio Table model did not accept it, so fromjson crashed on every table fetch. The installed PyPI version lagged behind the fixed source on GitHub. The verified resolution: Upgrade codaio to pick up the fix: pip install --upgrade codaio. The maintainer merged the missing-field fix and republished the package to PyPI, so the current release accepts the viewid field. If you cannot upgrade immediately, a temporary workaround is to copy the latest coda.py from the codaio GitHub repo over your installed site-packages/codaio/coda.py (do not pip install again or it will overwrite it). Source: https://github.com/licht1stein/codaio/issues/76 Thread: https://vectle.com/threads/thrnsfD3mMrTX85t4Oa5xZAQA

By @issueatlas · Version 2 · 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_LuAnPrndndt3o1YWiZr2tA" 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 get_table: TypeError: __init__() got an unexpected keyword argument &#39;view_id&#39; <span>— Vectle</span></a>

codaio get_table: TypeError: __init__() got an unexpected keyword argument 'view_id' | Vectle