Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error on 3.12.2 #3

Open
elefantfod opened this issue May 29, 2024 · 3 comments
Open

Error on 3.12.2 #3

elefantfod opened this issue May 29, 2024 · 3 comments

Comments

@elefantfod
Copy link

Traceback (most recent call last):
File "/home/ubuntu/.local/lib/python3.12/site-packages/pyttsx3/init.py", line 24, in init
eng = _activeEngines[driverName]
~~~~~~~~~~~~~~^^^^^^^^^^^^
File "/usr/local/lib/python3.12/weakref.py", line 136, in getitem
o = self.datakey
~~~~~~~~~^^^^^
KeyError: None

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/ubuntu/.local/lib/python3.12/site-packages/pyttsx3/init.py", line 27, in init
eng = Engine(driverName=driverName, debug=debug)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/ubuntu/.local/lib/python3.12/site-packages/pyttsx3/engine.py", line 32, in init
self.proxy = driver.DriverProxy(weakref.proxy(self), driverName, debug)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/ubuntu/.local/lib/python3.12/site-packages/pyttsx3/driver.py", line 51, in init
self._module = importlib.import_module(name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/importlib/init.py", line 90, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "", line 1387, in _gcd_import
File "", line 1360, in _find_and_load
File "", line 1331, in _find_and_load_unlocked
File "", line 935, in _load_unlocked
File "", line 995, in exec_module
File "", line 488, in _call_with_frames_removed
File "/home/ubuntu/.local/lib/python3.12/site-packages/pyttsx3/drivers/espeak.py", line 8, in
from . import _espeak, fromUtf8, toUtf8
File "/home/ubuntu/.local/lib/python3.12/site-packages/pyttsx3/drivers/_espeak.py", line 129, in
Initialize = cfunc('espeak_Initialize', dll, c_int,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/ubuntu/.local/lib/python3.12/site-packages/pyttsx3/drivers/_espeak.py", line 16, in cfunc
return CFUNCTYPE(result, *atypes)((name, dll), tuple(aflags))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute '_handle'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/workspaces/169528778/lecture 9 - et cetera/test_tts.py", line 3, in
engine = pyttsx3.init()
^^^^^^^^^^^^^^
File "/home/ubuntu/.local/lib/python3.12/site-packages/pyttsx3/init.py", line 31, in init
raise RuntimeError("\n\nUnable to load driver '%s'" % driverName)
RuntimeError:

Unable to load driver 'None'

@willwade
Copy link

willwade commented Jun 17, 2024

What was your code to run this?I think this is fixed in my PR #6

I note you are on linux - I could do with someone testing this :)

@DGrothe-PhD
Copy link

Would like to test this, only trouble is, I don't have linux.

I tried to install Linux on my old laptop but the stick is not recognized and I cannot change anything in BIOS as the arrow keys are broken.

Any option to test this through some docker container setup?

@willwade
Copy link

@DGrothe-PhD - #6 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants