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

'super' object has no attribute 'init' #39

Open
shaunrong opened this issue Feb 29, 2016 · 1 comment
Open

'super' object has no attribute 'init' #39

shaunrong opened this issue Feb 29, 2016 · 1 comment

Comments

@shaunrong
Copy link

speech_engine = pyttsx.init() in Mac OS X renders the following error:

`AttributeError Traceback (most recent call last)
in ()
----> 1 speech_engine = pyttsx.init()

/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pyttsx/init.pyc in init(driverName, debug)
37 eng = _activeEngines[driverName]
38 except KeyError:
---> 39 eng = Engine(driverName, debug)
40 _activeEngines[driverName] = eng
41 return eng

/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pyttsx/engine.pyc in init(self, driverName, debug)
43 @type debug: bool
44 '''
---> 45 self.proxy = driver.DriverProxy(weakref.proxy(self), driverName, debug)
46 # initialize other vars
47 self._connects = {}

/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pyttsx/driver.pyc in init(self, engine, driverName, debug)
64 self._module = import(name, globals(), locals(), [driverName])
65 # build driver instance
---> 66 self._driver = self._module.buildDriver(weakref.proxy(self))
67 # initialize refs
68 self._engine = engine

/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pyttsx/drivers/nsss.pyc in buildDriver(proxy)
22
23 def buildDriver(proxy):
---> 24 return NSSpeechDriver.alloc().initWithProxy(proxy)
25
26 class NSSpeechDriver(NSObject):

/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pyttsx/drivers/nsss.pyc in initWithProxy(self, proxy)
26 class NSSpeechDriver(NSObject):
27 def initWithProxy(self, proxy):
---> 28 self = super(NSSpeechDriver, self).init()
29 if self:
30 self._proxy = proxy

AttributeError: 'super' object has no attribute 'init'`

Can seek some help please?

@hako
Copy link

hako commented Mar 1, 2016

I had the same issue on Mac. This pull request #35 might help you.
I've tried it, and pyttsx works again.

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

2 participants