EOFError randomly appeared while using PYTTSX and my code now constantly throws this error? It worked fine hours before
Asked Answered
K

1

4

I was using PYTTSX yesterday with no issues at all - it was acting exactly as expected and working fine. However, when I tried to run the exact same code not two hours later it threw this error:

Traceback (most recent call last):
  File "C:\Python27\FUCK.py", line 2, in <module>
    engine = pyttsx.init()
  File "C:\Python27\lib\site-packages\pyttsx\__init__.py", line 39, in init
    eng = Engine(driverName, debug)
  File "C:\Python27\lib\site-packages\pyttsx\engine.py", line 45, in __init__
    self.proxy = driver.DriverProxy(weakref.proxy(self), driverName, debug)
  File "C:\Python27\lib\site-packages\pyttsx\driver.py", line 64, in __init__
    self._module = __import__(name, globals(), locals(), [driverName])
  File "C:\Python27\lib\site-packages\pyttsx\drivers\sapi5.py", line 19, in <module>
    import win32com.client
  File "C:\Python27\lib\site-packages\win32com\client\__init__.py", line 11, in <module>
    import gencache
  File "C:\Python27\lib\site-packages\win32com\client\gencache.py", line 662, in <module>
__init__()
  File "C:\Python27\lib\site-packages\win32com\client\gencache.py", line 56, in __init__
_LoadDicts()
  File "C:\Python27\lib\site-packages\win32com\client\gencache.py", line 109, in _LoadDicts
version = p.load()
EOFError

and it has been throwing this error ever since. The code which was working fine before hasn't been changed at all, and the same code works fine on my Linux partition, this error seems to be windows exclusive. Any idea what it could be?

Kunkel answered 3/12, 2015 at 11:38 Comment(1)
I am having exactly the same error :/Unmuzzle
M
6

It is a simple procedure:

  1. Go to python27 folder
  2. Search for dicts.dat
  3. Delete that folder

It will work because I have done it

Maldonado answered 16/7, 2016 at 0:57 Comment(1)
Worked for me. Found the dicts.dat file here: C:\Python27\Lib\site-packages\win32com\gen_pyFilomenafiloplume

© 2022 - 2024 — McMap. All rights reserved.