Sunday, April 03, 2005

PyTTS incompatibility with Python 2.4

When I try to use PyTTS with Python 2.4, I get

Traceback (most recent call last):
File "tts.py", line 3, in ?
tts = pyTTS.Create()
File "C:\Python23\Lib\site-packages\pyTTS\__init__.py", line 28, in Create
raise ValueError('"%s" not supported' % api)
ValueError: "SAPI" not supported

Digging deeper I see that the actual exception is quite different (alas, the perils of eating exceptions):

Traceback (most recent call last):
File "tts.py", line 1, in ?
import pyTTS
File "C:\Python24\lib\site-packages\pyTTS\__init__.py", line 4, in ?
import sapi
File "C:\Python24\lib\site-packages\pyTTS\sapi.py", line 10, in ?
sapi_mod = gencache.EnsureModule('{C866CA3A-32F7-11D2-9602-00C04F8EE628}', 0
, 5, 0)
File "C:\Python24\Lib\site-packages\win32com\client\gencache.py", line 393, in
EnsureModule
module = GetModuleForTypelib(typelibCLSID, lcid, major, minor)
File "C:\Python24\Lib\site-packages\win32com\client\gencache.py", line 258, in
GetModuleForTypelib
mod = _GetModule(modName)
File "C:\Python24\Lib\site-packages\win32com\client\gencache.py", line 629, in
_GetModule
mod = __import__(mod_name)
File "C:\Python24\lib\site-packages\win32com\gen_py\C866CA3A-32F7-11D2-9602-00
C04F8EE628x0x5x0.py", line 1192
"""Add"""
^
SyntaxError: invalid syntax

Anyway, I don't have any problems when I use PyTTS with Python 2.3

0 Comments:

Post a Comment

<< Home