Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

googletrans is not working #346

Closed
Lokeshthakur1 opened this issue Jun 25, 2022 · 8 comments
Closed

googletrans is not working #346

Lokeshthakur1 opened this issue Jun 25, 2022 · 8 comments
Labels

Comments

@Lokeshthakur1
Copy link

Lokeshthakur1 commented Jun 25, 2022

python code

from googletrans import Translator
translator = Translator()
translated = translator.translate('svízelná situace', src='cs', dest='hu')
print(translated.text)

this error

D:\work\python\google-message>py index.py
Traceback (most recent call last):
File "index.py", line 48, in
translated = translator.translate('svízelná situace', src='cs', dest='hu')
File "C:\Users\lthak\AppData\Roaming\Python\Python37\site-packages\googletrans\client.py", line 182, in translate
data = self._translate(text, dest, src, kwargs)
File "C:\Users\lthak\AppData\Roaming\Python\Python37\site-packages\googletrans\client.py", line 78, in _translate
token = self.token_acquirer.do(text)
File "C:\Users\lthak\AppData\Roaming\Python\Python37\site-packages\googletrans\gtoken.py", line 194, in do
self._update()
File "C:\Users\lthak\AppData\Roaming\Python\Python37\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'

@fullbright
Copy link

Same issue here. Did you find a solution?

@fullbright
Copy link

Duplicate with #234

@amirbtb
Copy link

amirbtb commented Jun 27, 2022

Same error.

@tayheau
Copy link

tayheau commented Jul 1, 2022

same !

@kurtabela
Copy link

Same issue, doing pip install googletrans==4.0.0rc1 worked for me

@raz0229
Copy link

raz0229 commented Jul 1, 2022

self.RE_TKK.search(r.text) in gtoken.py returns a None. Can't understand the regex pattern unfortunately

@ehsong
Copy link

ehsong commented Jul 13, 2022

install googletrans==4.0.0rc1

So this doesn't throw the group error, but says <googletrans.models.Translated at 0x7fa291190820>, doesn't show the translation?

@stale
Copy link

stale bot commented Sep 20, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Sep 20, 2022
@stale stale bot closed this as completed Oct 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

7 participants