top of page
Search

Translate List of Sentences In Python

Writer's picture: Learning Streamlined with VGLearning Streamlined with VG

Updated: Dec 1, 2024







1 Comment


Anu Sharma
Anu Sharma
Mar 03, 2021

The program to translate in different languages is giving error. Pip installed successfuly. every char matched with sample prg.

Traceback (most recent call last):

File "E:\XII_2020\MiscPrograms\TranslateEng2Hindi.py", line 13, in <module>

translations = translator.translate(['what is your Name', 'how old are you', 'How are you'], dest='hi')

File "C:\Users\AppData\Local\Programs\Python\Python38-32\lib\site-packages\googletrans\client.py", line 177, in translate

translated = self.translate(item, dest=dest, src=src, **kwargs)

File "C:\Users\AppData\Local\Programs\Python\Python38-32\lib\site-packages\googletrans\client.py", line 182, in translate

data = self._translate(text, dest, src, kwargs)

File "C:\Users\AppData\Local\Programs\Python\Python38-32\lib\site-packages\googletrans\client.py", line 78, in _translate

token = self.token_acquirer.do(text)

File "C:\Users\AppData\Local\Programs\Python\Python38-32\lib\site-packages\googletrans\gtoken.py", line 194, in do

self._update()

File "C:\Users\AppData\Local\Programs\Python\Python38-32\lib\site-packages\googletrans\gtoken.py", line 62, in _update

code = self.RE_TKK.search(r.text).group(1).replace('var ', '')

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

Like

Entire e-content present here is also available on Google Play store in the form of a mobile app. Click on the button to download the app.

Don't Miss Out

Sign Up and Get All New Updates

Thanks for submitting!

Thanks for visiting!!!

bottom of page