0

I am trying to create a translator with tkinter, pyttsx3 and googletrans. It will translate English to Spanish and talk to you, but I keep getting the following error:

code = self.RE_TKK.search(r.text).group(1).replace('var ', '')
AttributeError: 'NoneType' object has no attribute 'group'

This is my code that might be creating the problem:

def speaking_sound():
engine = pyttsx3.init()
traslator = Translator()
out = traslator.translate(my_entry.get(), dest='es')
engine.say(out)

engine.runAndWait()  

Please help!

acw1668
  • 40,144
  • 5
  • 22
  • 34
evan_tech1234
  • 123
  • 12
  • 1
    We don't need code that _might_ create the problem. We need you to create a [mcve] that _does_ create the problem. – Bryan Oakley Apr 15 '21 at 02:53
  • 1
    Same issue as [googletrans-stopped-working-with-error-nonetype-object-has-no-attribute-group](https://stackoverflow.com/questions/52455774/googletrans-stopped-working-with-error-nonetype-object-has-no-attribute-group). Try install `googletrans` version 3.1.0a0. – acw1668 Apr 15 '21 at 03:33
  • @acw1668 do you know the command to install that version from the one I already have? – evan_tech1234 Apr 15 '21 at 13:22
  • `pip install -U googletrans==3.1.0a0`. – acw1668 Apr 15 '21 at 13:28

0 Answers0