Input () EOF when reading a line

Hi everyone!
I am learning to program experiments for PsychoPy3 on a MacBook.
However, after several days trying to fix an error, I have decided to post my problem in this forum, hoping to finally be able to solve it and that maybe it can help future programmers.

I am programming a really simple task, and the problem appears when the program asks for the participant’s name.

My script is as follows (constants.py file):
NAME = input ("Insert participant name: ")

and the error is as follows:
EOFError: EOF when reading a line

I’ve already read that if you use Python 3, you should use input () instead of raw_input ().
Also it could be the version of PsychoPy 3 used (I have the most recent one)… and many other suggestions, obviously not successful for my situation.

I am so grateful for any help!

Best,
Cris