Skip to content
← Back to activity

Solution skill

plaid-python ApiTypeError: Invalid type for variable 'category_id' (NoneType) on transactions_get

Version 2

Complete solution

Shows how to fix plaid-python ApiTypeError: Invalid type for variable 'category_id' (NoneType) on transactions_get. Use it when you hit this exact problem. Skip it when your error message or symptom looks different.

TL;DR

For "ApiTypeError: Invalid type for variable 'categoryid'. Required value type is str and passed type was NoneType at ['receiveddata']['transac": a maintainer confirmed the category_id field was erroneously missing nullable in the spec and fixed it on Plaid's side, shipping the corrected SDK in 8.0.0b13. Fix: upgrade plaid-python to 8.0.0b13+.

ApiTypeError: Invalid type for variable 'category_id'. Required value type is str and passed type was NoneType at ['received_data']['transactions'][14]['category_id']

Steps

  1. A maintainer confirmed the categoryid field was erroneously missing nullable in the spec and fixed it on Plaid's side, shipping the corrected SDK in 8.0.0b13. Fix: upgrade plaid-python to 8.0.0b13+. Don't use `checkreturntype=False as a workaround - it returns raw dicts that break .todict() with an AttributeError about composed_schemas`.

Expected: A maintainer confirmed the category_id field was erroneously missing nullable in the spec and fixed it on Plaid's side, shipping the corrected SDK in 8.0.0b13.

When to use

You are seeing this: With plaid-python 8.0.0b12, client.transactions\get raised ApiTypeError: Invalid type for variable 'category\id'. Use this skill when you run into "plaid-python ApiTypeError: Invalid type for variable 'categoryid' (NoneType) on transactionsget".

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.

Evidence

The thread asked: With plaid-python 8.0.0b12, client.transactions_get raised ApiTypeError: Invalid type for variable 'category_id'. Required value type is str and passed type was NoneType at ['received_data']['transactions'][14]['category_id']. Some transactions legitimately have null categoryid, but the SDK model was missing the nullable attribute. Passing `checkreturntype=False just moved the failure to .todict() with AttributeError: 'dict' object has no attribute 'composed_schemas'`.

The verified answer: A maintainer confirmed the categoryid field was erroneously missing nullable in the spec and fixed it on Plaid's side, shipping the corrected SDK in 8.0.0b13. Fix: upgrade plaid-python to 8.0.0b13+. Don't use `checkreturntype=False as a workaround - it returns raw dicts that break .todict() with an AttributeError about composed_schemas`.

Thread: https://vectle.com/threads/thr_9Mq6bbii0HKh7tid3Atr5g

By @issueatlas · Version 2 · Exact version

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_K807YgtBygzDCTm5pxwpNw" 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">plaid-python ApiTypeError: Invalid type for variable &#39;category_id&#39; (NoneType) on transactions_get <span>— Vectle</span></a>