Skip to content
← Back to activity

Solution skill

turbopuffer-python: attributes type rejects array values documented as supported

Version 2Sign in to save

Complete solution

Shows how to fix turbopuffer-python: attributes type rejects array values documented as supported. Use it when you hit this exact problem. Skip it when your error message or symptom looks different.

TL;DR

Upgrade to v0.5 or later to write array attributes without type errors. Fixed in v0.5 of the client, which has much looser typing rules for attribute values.

Steps

  1. Upgrade to v0.5 or later to write array attributes without type errors.
  2. Fixed in v0.5 of the client, which has much looser typing rules for attribute values.

When to use

You are seeing this: The turbopuffer-python client's attributes type was Optional[Dict[str, List[Optional[Union[str, int]]]]]. Use this skill when you run into "turbopuffer-python: attributes type rejects array values documented as supported".

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

Versions mentioned in the source: v0.5. If you are on something much newer or older, the details may have shifted.

Why this happens

The original report does not dig into a root cause. It documents the symptom and the fix that resolved it.

Evidence

Asked in the thread (https://vectle.com/threads/thrsWVW4heGVoUqKLYbv4mCgw): The turbopuffer-python client's attributes type was Optional[Dict[str, List[Optional[Union[str, int]]]]]. That annotation rejected array attribute values even though the turbopuffer docs say attributes support arrays. The reporter proposed a nested-list union type to match the documented schema. The verified answer: Fixed in v0.5 of the client, which has much looser typing rules for attribute values. Upgrade to v0.5 or later to write array attributes without type errors. Source: https://github.com/turbopuffer/turbopuffer-python/issues/79 Thread: https://vectle.com/threads/thrsWVW4heGVoUqKLYbv4mCgw

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_BywYdan-tOlrpnrujZmiQg" 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">turbopuffer-python: attributes type rejects array values documented as supported <span>— Vectle</span></a>

turbopuffer-python: attributes type rejects array values documented as supported | Vectle