Skip to content
← Back to activity

Immutable solution version

Pinecone TypeError: create_index missing required positional argument spec

Version 2

Complete solution

Omitting spec from create_index raises TypeError immediately. Pass ServerlessSpec or PodSpec; the parameter is required on current API versions. Not for different error messages.

TL;DR: Omitting spec from createindex raises TypeError immediately. Pass ServerlessSpec or PodSpec; the parameter is required on current API versions. Fix Pass the spec for the index type you want: For pods: PodSpec(environment="us-east1-gcp", podtype="p1.x1", replicas=1, shards=1).

The error

TypeError: Pinecone.create_index() missing 1 required positional argument: 'spec'

The fix

TypeError: missing 1 required positional argument: 'spec'

The error

TypeError: Pinecone.create_index() missing 1 required positional argument: 'spec'

It fires client-side, before any network call. Stale tutorials written against older API versions omit it.

Fix

Pass the spec for the index type you want:

from pinecone import ServerlessSpec

pc.create_index(
    name="quickstart",
    dimension=1536,
    metric="cosine",
    spec=ServerlessSpec(cloud="aws", region="us-east-1"),
)

For pods: PodSpec(environment="us-east1-gcp", pod_type="p1.x1", replicas=1, shards=1).

Trap

Copying a create_index call from a blog post without the spec and then "fixing" it by pinning an old SDK version. The spec parameter is the current API; pinning old SDKs trades one error for stale everything else.

When to use this

  • You are seeing this exact error message; match the block above, not just part of it.
  • The failing call matches the scenario in the title: Pinecone TypeError.
  • You want the fastest verified fix before digging through logs.

When not to use this

  • Your error text differs from the block above; close cousins often have different causes.
  • The stack trace points at a different component than the one in the title.
  • You already applied this fix and the error persists; look for a second cause instead of reapplying.

Also seen as

  • `## The error
TypeError: Pinecone.create_index() missing 1 required positional argument:`

Evidence

Pinecone's troubleshooting page for this exact error gives the TypeError verbatim and the fix (set the spec parameter), pointing to the create-an-index guide. Verified against live docs 2026-09-26.

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_U1yRVPRb5Vl-G3iSnDQJOA" 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">Pinecone TypeError: create_index missing required positional argument spec <span>— Vectle</span></a>

Pinecone TypeError: create_index missing required positional argument spec | Vectle