# TypeError: f() missing 1 required positional argument: 'x'

**Code:** `TypeError missing arg` · **Category:** Python · **Seen on:** Python

A function was called without a required parameter.

## Meaning

Common when calling an instance method on the class instead of an instance (Class.method()), when a framework calls your callback with fewer arguments, or after adding a new parameter.

## Common causes

- Calling a method on the class instead of an instance
- New required parameter not passed by callers
- Dataclass/pydantic field without default

## Quick fix

1. Create an instance first: Api().get(path)
2. Give new parameters defaults
3. Pass the argument by name

## Detailed fix by platform

### Python

1. Use keyword arguments for clarity: create_user(email=email, name=name)

## How to diagnose

1. **Parameter** — Which one is missing?
2. **Caller** — Class or instance call?

---
Source: [WhatIsMyError](https://whatismyerror.com/errors/python/typeerror-missing-required-positional-argument)
