本人Python萌新
源程序:
import pyttsx3
engine = pyttsx3.init()
engine.say(entryName.get())
engine.runAndWait()
以下是报错信息:
Exception in Tkinter callback
Traceback (most recent call last):
File "D:gan_pyvenvScriptspython.exelibsite-packagespyttsx3__init__.py", line 20, in init
eng = _activeEngines[driverName]
File "C:UsersAdministratorAppDataLocalProgramsPythonPython37libweakref.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 "C:UsersAdministratorAppDataLocalProgramsPythonPython37libtkinter__init__.py", line 1705, in __call__
return self.func(*args)
File "D:/code/venv/1.py", line 63, in addInformation
engine = pyttsx3.init()