Closed hulk248 closed 3 years ago
Issue-Label Bot is automatically applying the label bug
to this issue, with a confidence of 0.71. Please mark this comment with :thumbsup: or :thumbsdown: to give our bot feedback!
Links: app homepage, dashboard and code for this bot.
Duplicate error #137
I am getting a similar error.
Traceback (most recent call last): File "E:\Software\sarina-env\lib\site-packages\pyttsx3__init__.py", line 20, in init eng = _activeEngines[driverName] File "E:\Software\sarina-env\lib\weakref.py", line 137, in getitem o = self.data[key]() KeyError: None
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "E:\Software\sarina-env\lib\site-packages\pyttsx3\drivers\sapi5.py", line 3, in
from comtypes.gen import SpeechLib # comtypes
ImportError: cannot import name 'SpeechLib' from 'comtypes.gen' (E:\Software\sarina-env\lib\site-packages\comtypes\gen__init__.py)
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "e:/Software/sarina-env/sarina/sarina.py", line 14, in
from sarina.speech import query, synthesiser
File "e:\Software\sarina-env\sarina\sarina\speech\query.py", line 18, in
from sarina.speech import synthesiser
File "e:\Software\sarina-env\sarina\sarina\speech\synthesiser.py", line 7, in
text_to_speech_engine = pyttsx3.init()
File "E:\Software\sarina-env\lib\site-packages\pyttsx3__init.py", line 22, in init
eng = Engine(driverName, debug)
File "E:\Software\sarina-env\lib\site-packages\pyttsx3\engine.py", line 30, in init
self.proxy = driver.DriverProxy(weakref.proxy(self), driverName, debug)
File "E:\Software\sarina-env\lib\site-packages\pyttsx3\driver.py", line 50, in init
self._module = importlib.import_module(name)
File "E:\Software\sarina-env\lib\importlib__init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "E:\Software\sarina-env\lib\site-packages\pyttsx3\drivers\sapi5.py", line 6, in
engine = comtypes.client.CreateObject("SAPI.SpVoice")
File "E:\Software\sarina-env\lib\site-packages\comtypes\client__init__.py", line 250, in CreateObject
return _manage(obj, clsid, interface=interface)
File "E:\Software\sarina-env\lib\site-packages\comtypes\client__init__.py", line 188, in _manage
obj = GetBestInterface(obj)
File "E:\Software\sarina-env\lib\site-packages\comtypes\client\ init__.py", line 110, in GetBestInterface
mod = GetModule(tlib)
File "E:\Software\sarina-env\lib\site-packages\comtypes\client_generate.py", line 110, in GetModule
mod = _CreateWrapper(tlib, pathname)
File "E:\Software\sarina-env\lib\site-packages\comtypes\client_generate.py", line 172, in _CreateWrapper
generate_module(tlib, ofi, pathname)
File "E:\Software\sarina-env\lib\site-packages\comtypes\tools\tlbparser.py", line 750, in generate_module
gen.generate_code(list(items.values()), filename=pathname)
File "E:\Software\sarina-env\lib\site-packages\comtypes\tools\codegenerator.py", line 241, in generate_code
self.generate_all(items)
File "E:\Software\sarina-env\lib\site-packages\comtypes\tools\codegenerator.py", line 189, in generate_all
self.generate(item)
File "E:\Software\sarina-env\lib\site-packages\comtypes\tools\codegenerator.py", line 185, in generate
mth(item)
File "E:\Software\sarina-env\lib\site-packages\comtypes\tools\codegenerator.py", line 701, in ComInterface
self.generate(itf.get_head())
File "E:\Software\sarina-env\lib\site-packages\comtypes\tools\codegenerator.py", line 185, in generate
mth(item)
File "E:\Software\sarina-env\lib\site-packages\comtypes\tools\codegenerator.py", line 722, in ComInterfaceHead
self.generate(base.get_head())
File "E:\Software\sarina-env\lib\site-packages\comtypes\tools\codegenerator.py", line 185, in generate
mth(item)
File "E:\Software\sarina-env\lib\site-packages\comtypes\tools\codegenerator.py", line 629, in External
comtypes.client.GetModule(ext.tlib)
File "E:\Software\sarina-env\lib\site-packages\comtypes\client_generate.py", line 110, in GetModule
mod = _CreateWrapper(tlib, pathname)
File "E:\Software\sarina-env\lib\site-packages\comtypes\client_generate.py", line 184, in _CreateWrapper
mod = _my_import(fullname)
File "E:\Software\sarina-env\lib\site-packages\comtypes\client_generate.py", line 24, in _my_import
return import__(fullname, globals(), locals(), ['DUMMY'])
ModuleNotFoundError: No module named 'comtypes.gen._00020430_0000_0000_C000_000000000046_0_2_0'
Originally posted by @EquallyWolf in https://github.com/nateshmbhat/pyttsx3/issues/94#issuecomment-583868405