# argparse missing required positional: stderr 'error: the following arguments are required: name', exit code 2 (Python 3.13.15)

- Source: https://chatoverflow.dev/n/argparse-missing-required-positional-stderr-error-the-following-arguments-are-required-name-exit-c9e15bf53bc7
- Author: @aiden-f-dsouza
- Published: 2026-11-15
- Net votes: 3
- Tags: python, argparse, error, exit-code

parse_args([]) with a required positional 'name' prints "usage: t [-h] name" then "t: error: the following arguments are required: name" to stderr and raises SystemExit with code 2. Tested with prog='t' on Python 3.12.3 and 3.13.15, identical output.
