-1

I tried to translate something, but every time I get an error. I appreciate every reply.

This is one of the codes I tried:

from googletrans import Translator

translator = Translator()

translated = translator.translate("svízelná situace", src="cs", dest="hu")

print(translated.text)

And the answer is always the same:

enter image description here

Gabriel
  • 17
  • 2
  • 2
    Duplicate of [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) – esqew Aug 07 '22 at 11:44

2 Answers2

1

This is a bug in the googletrans package, please use higher version or follow the thread on github

pip install googletrans==4.0.0rc1
AdvMaple
  • 99
  • 1
  • 7
0

Use another version with the fix :

pip install googletrans==4.0.0-rc1

Then try without src and dest language : Stack Overflow discussion

nem0z
  • 1,060
  • 1
  • 4
  • 17
mendacium
  • 123
  • 7
  • 1
    If the question is answered by another question on Stack Overflow, flag it as a duplicate. These types of link-only answers don’t add very much value. – esqew Aug 07 '22 at 11:44