-1

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 .

Jack Benson
  • 107
  • 1
  • 8

3 Answers3

0

I figured out a fix. I re-installed python completely. Then all the packages and it worked.

Jack Benson
  • 107
  • 1
  • 8
0

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.

Gerto
  • 26
  • 2
0

If all the commands and function calls are correct and the error started showing up mysteriously then any bug might wile have occurred because of any wrong call or disturbing the files.

It have a simple solution... Just open the scripts directory in the command prompt and type the command

pip install --upgrade pyttsx3

This will automatically uninstall and then re-install the libraries which will set it to default. This have always worked for me, so I think this will work for you too..

Dr. Aniket
  • 11
  • 2