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

why it raising an error #383

Open
balu54 opened this issue Jul 22, 2023 · 3 comments
Open

why it raising an error #383

balu54 opened this issue Jul 22, 2023 · 3 comments
Labels

Comments

@balu54
Copy link

balu54 commented Jul 22, 2023

hey i am getting following error how can i fix it

from googletrans import Translator

translator = Translator()
translation = translator.translate('kaise re bhai', dest='en')
print(translation.text)


AttributeError Traceback (most recent call last)
in <cell line: 4>()

----> 4 translation = translator.translate('kaise re bhai', dest='en')

3 frames
/usr/local/lib/python3.10/dist-packages/googletrans/gtoken.py in _update(self)
60
61 # this will be the same as python code after stripping out a reserved word 'var'
---> 62 code = self.RE_TKK.search(r.text).group(1).replace('var ', '')
63 # unescape special ascii characters such like a \x3d(=)
64 code = code.encode().decode('unicode-escape')

AttributeError: 'NoneType' object has no attrib

@acmpo6ou
Copy link

I'm getting the same error. I can see it has to do with acquiring a token, so I guess their method doesn't work anymore.

@acmpo6ou
Copy link

Hey, I found the answer: #366 (comment)

@stale
Copy link

stale bot commented Oct 15, 2023

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 Oct 15, 2023
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

2 participants