+ 1

Pyttsx3 module .init() error

Heya ! This is an unnecessary error that keeps on coming when I try to take the output . The code - Import pyttsx3 as v Engine = v.init() Engine.say("something") Engine.runAndWait() Output - Attribute error - pyttsx3 has no module named init. And I am talking about python's module pyttsx3.

30th Dec 2021, 9:49 AM
NotHuman
NotHuman - avatar
5 Answers
+ 2
You missed the () of the runAndWait method?
30th Dec 2021, 10:00 AM
Lisa
Lisa - avatar
+ 1
Na I just forgot to paste it here .
30th Dec 2021, 2:20 PM
NotHuman
NotHuman - avatar
+ 1
Did you by any chance call your file pyttsx3.py? If you have a file of that name in the same directory python will use that file instead of the module you're trying to import.
30th Dec 2021, 3:15 PM
Simon Sauter
Simon Sauter - avatar
+ 1
Lisa Simon Sauter Thanks to you both but it was a simple problem that I had saved the same file as the module :p
31st Dec 2021, 4:10 PM
NotHuman
NotHuman - avatar