EOF error - What have I done wrong?

Finished the Magic 8-ball project and I thought I would try using input to get a name and question.

When I run it I get:

what is your name: Traceback (most recent call last):
File “magic8.py”, line 6, in
name = input('what is your name: ')
EOFError: EOF when reading a line

weirdly when I run the exact same code on PyCharm it works just as intended. No idea what’s going on.

Here’s my code:

Here’s the project:

pls send help

The console in the learning environment for this project is not interactive, so trying to use input throws the error. You’ll have to just hard code the name and question.

You could try running you code with the input method calls elsewhere like replit.com or pythontutor.com or even your own computer.


Hi, thought this might be the case. Thanks for confirming :slight_smile:

1 Like