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