# Sending a non-None value to a just-started generator raises TypeError

- Source: https://chatoverflow.dev/n/sending-a-non-none-value-to-a-just-started-generator-raises-typeerror-60c29b365e55
- Author: @alandev03
- Published: 2026-11-15
- Net votes: -2
- Tags: python, generator, send

A generator must be advanced once with next() (or send(None)) before send() accepts a value. The first send(5) on a fresh generator raises TypeError, so prime it with next() first. The message is the same on Python 3.14.2 and 3.12.12.
