Задать вопрос
@Adminx1

Не работает pyttsx3?

Не работает pyttsx3:
Traceback (most recent call last):
File "C:\Users\User\AppData\Local\Programs\Python\Python37-32\lib\site-packages\pyttsx3\__init__.py", line 20, in init
eng = _activeEngines[driverName]
File "C:\Users\User\AppData\Local\Programs\Python\Python37-32\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:\Proj\RCS\build\victory.py", line 2, in
engine = pyttsx3.init()
File "C:\Users\User\AppData\Local\Programs\Python\Python37-32\lib\site-packages\pyttsx3\__init__.py", line 22, in init
eng = Engine(driverName, debug)
File "C:\Users\User\AppData\Local\Programs\Python\Python37-32\lib\site-packages\pyttsx3\engine.py", line 30, in __init__
self.proxy = driver.DriverProxy(weakref.proxy(self), driverName, debug)
File "C:\Users\User\AppData\Local\Programs\Python\Python37-32\lib\site-packages\pyttsx3\driver.py", line 50, in __init__
self._module = importlib.import_module(name)
File "C:\Users\User\AppData\Local\Programs\Python\Python37-32\lib\importlib\__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1006, in _gcd_import
File "", line 983, in _find_and_load
File "", line 967, in _find_and_load_unlocked
File "", line 677, in _load_unlocked
File "", line 728, in exec_module
File "", line 219, in _call_with_frames_removed
File "C:\Users\User\AppData\Local\Programs\Python\Python37-32\lib\site-packages\pyttsx3\drivers\sapi5.py", line 3, in
import win32com.client
File "C:\Users\User\AppData\Local\Programs\Python\Python37-32\lib\site-packages\win32com\client\__init__.py", line 11, in
from . import gencache
File "C:\Users\User\AppData\Local\Programs\Python\Python37-32\lib\site-packages\win32com\client\gencache.py", line 660, in
__init__()
File "C:\Users\User\AppData\Local\Programs\Python\Python37-32\lib\site-packages\win32com\client\gencache.py", line 60, in __init__
_LoadDicts()
File "C:\Users\User\AppData\Local\Programs\Python\Python37-32\lib\site-packages\win32com\client\gencache.py", line 113, in _LoadDicts
version = p.load()
_pickle.UnpicklingError: invalid load key, '\x00'.

E:\Proj\RCS\build>victory.py
Traceback (most recent call last):
File "C:\Users\User\AppData\Local\Programs\Python\Python37-32\lib\site-packages\pyttsx3\__init__.py", line 20, in init
eng = _activeEngines[driverName]
File "C:\Users\User\AppData\Local\Programs\Python\Python37-32\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:\Proj\RCS\build\victory.py", line 2, in
engine = pyttsx3.init()
File "C:\Users\User\AppData\Local\Programs\Python\Python37-32\lib\site-packages\pyttsx3\__init__.py", line 22, in init
eng = Engine(driverName, debug)
File "C:\Users\User\AppData\Local\Programs\Python\Python37-32\lib\site-packages\pyttsx3\engine.py", line 30, in __init__
self.proxy = driver.DriverProxy(weakref.proxy(self), driverName, debug)
File "C:\Users\User\AppData\Local\Programs\Python\Python37-32\lib\site-packages\pyttsx3\driver.py", line 50, in __init__
self._module = importlib.import_module(name)
File "C:\Users\User\AppData\Local\Programs\Python\Python37-32\lib\importlib\__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1006, in _gcd_import
File "", line 983, in _find_and_load
File "", line 967, in _find_and_load_unlocked
File "", line 677, in _load_unlocked
File "", line 728, in exec_module
File "", line 219, in _call_with_frames_removed
File "C:\Users\User\AppData\Local\Programs\Python\Python37-32\lib\site-packages\pyttsx3\drivers\sapi5.py", line 3, in
import win32com.client
File "C:\Users\User\AppData\Local\Programs\Python\Python37-32\lib\site-packages\win32com\client\__init__.py", line 11, in
from . import gencache
File "C:\Users\User\AppData\Local\Programs\Python\Python37-32\lib\site-packages\win32com\client\gencache.py", line 660, in
__init__()
File "C:\Users\User\AppData\Local\Programs\Python\Python37-32\lib\site-packages\win32com\client\gencache.py", line 60, in __init__
_LoadDicts()
File "C:\Users\User\AppData\Local\Programs\Python\Python37-32\lib\site-packages\win32com\client\gencache.py", line 113, in _LoadDicts
version = p.load()
_pickle.UnpicklingError: invalid load key, '\x00'.
  • Вопрос задан
  • 290 просмотров
Подписаться 1 Простой 1 комментарий
Решения вопроса 1
sergey-gornostaev
@sergey-gornostaev Куратор тега Python
Седой и строгий
Попробуйте удалить кэш COM-интерфейсов. Он может располагаться в C:\Users\User\AppData\Local\Temp\gen_py\3.7 И проверьте, что в системе есть голосовые движки.
Ответ написан
Пригласить эксперта
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Похожие вопросы