-1

I am trying to use googletrans to translate some Spanish text to English. I am following the examples & below is my code.

from googletrans import Translator
translator = Translator()
txt = translator.translate('tener', src='es', dest='en')

I get the following error though,

AttributeError: 'NoneType' object has no attribute 'group'

What am I missing?

Stevoisiak
  • 23,794
  • 27
  • 122
  • 225
mHelpMe
  • 6,336
  • 24
  • 75
  • 150
  • 1
    Does this answer your question? [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) – Tyberius Jan 22 '21 at 18:16
  • 1
    There is also an ongoing Github issue addressing this: https://github.com/ssut/py-googletrans/issues/234 – Tyberius Jan 22 '21 at 18:17

1 Answers1

1

Seems like the issue is with Google, see the following stackoverflow post: googletrans stopped working with error 'NoneType' object has no attribute 'group'

This solution worked for me (the accepted doesn't work for me): https://stackoverflow.com/a/65113191/14676920

Hui Gui
  • 123
  • 6