когда я запускаю образец программы с pyttsx, он бросает трассировку - PullRequest
0 голосов
/ 30 мая 2020

Я только что запустил пример программы pypptsx3 из pypi

import pyttsx3
engine = pyttsx3.init()
engine.say("I will speak this text")
engine.runAndWait()

, но он выдает много ошибок, таких как ошибка ключа, ошибка типа и ошибка импорта.

KeyError: None

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
ImportError: cannot import name 'SpeechLib' from 'comtypes.gen' (C:\Users\Admin\anaconda3\lib\site-packages\comtypes\gen\__init__.py)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
KeyError: (<class 'ctypes.HRESULT'>, (<class 'comtypes.automation.tagVARIANT'>, <class 'ctypes.wintypes.LP_c_long'>), 0)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
TypeError: item 1 in _argtypes_ passes a union by value, which is unsupported.

Следует ли мне удалить и снова установить библиотеку? В чем причина этой ошибки?

...