I get the "ran out of input error" when I run it directly. Can't copy paste it because it won't let me select the text for some reason. The other error I get, when running it through IDLE, is pyttx3 module not found. I can import it in other ide's and its fine to import when running with python directly. Here is my code:
import pyttsx3
engine = pyttsx3.init()
EDIT: Yes I mean the EOFError. I've tried the other solutions listed on here and they didn't work for me, I also thought it was super weird that IDLE didn't even recognize the module at all. My version of OS is Windows 10 version 1803 (64bit) and my version of python is 3.7.2 .
I had the same problem. Suddenly pttsx3 wasn't working anymore and even creating a new virtual environment didn't work.
I'm on windows and running Python 3.7; I don't know how this happened but there was an empty file named "dicts.dat" under "AppData\Local\Temp\gen_py\3.7" which was causing this error, removing this file immediately fixed the problem for me.