I have a python script that I made and it uses pyttsx for text to speech output. Whenever I converted it to an exe using py2exe and tried running the exe I get the following error:
Traceback (most recent call last):
File "main.py", line 8, in <module>
File "pyttsx\__init__.pyc", line 39, in init
File "pyttsx\engine.pyc", line 45, in __init__
File "pyttsx\driver.pyc", line 66, in __init__
File "pyttsx\drivers\sapi5.pyc", line 37, in buildDriver
File "pyttsx\drivers\sapi5.pyc", line 46, in __init__
File "win32com\client\__init__.pyc", line 317, in WithEv
AttributeError: 'NoneType' object has no attribute 'CLSID'
Here is a copy of my setup.py:
from distutils.core import setup
import py2exe
setup(
console=['main.py'],
options = {
"py2exe":{
"includes":[
'pyttsx.drivers.sapi5'
]
}
}
)