Error guide · Other errors
EOFError: EOF when reading a line
The program called input() but there was no more input to read.
Example
a = input() b = input() print(a + b)
With the program input: 5
What Python says
EOFError: EOF when reading a line
As printed by Python 3.12. Other versions may word it slightly differently.
Why it happens
EOF means "end of file". Each input() reads one line. In Py-CRAFT, the lines come from the Program input box, so if the program asks for more lines than you typed, it fails.
How to fix it
a = input() b = input() print(a + b)
Output: 57
Tips
- Type one answer per line in the Program input box, one for each
input(). - Count the
input()calls in your program, including those inside loops.