error in googletrans 4.0.0rc1 translator

See original GitHub issue

I tried the new version of googletrans 4.0.0rc1.

translator = Translator(service_urls=['translate.google.com'])
res = translator.translate(text)

After some time an exception occurs: AttributeError: 'Translator' object has no attribute 'raise_Exception'

To fix this I need to execute this line:

translator.raise_Exception = True

And then the exception writes: Exception: Unexpected status code "429" from ['translate.google.com']

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:10
  • Comments:17

github_iconTop GitHub Comments

23reactions
EamonJarrett-Manncommented, Jun 23, 2021

Wanted to comment so other people don’t have to perform another search: currently google translate API allows 5 calls/second, caps it at 200k a day

12reactions
emirpie2021commented, Jan 10, 2021

Hi, I just used time.sleep(1) in translation loop. It gives more coffee time, works for me.

Read more comments on GitHub >

github_iconTop Results From Across the Web

I get an error when I try to translate something with googletrans
This is a bug in the googletrans package, please use higher version or follow the thread on github pip install googletrans==4.0.0rc1.
Read more >
AttributeError: 'NoneType' object has no attribute 'group' error ...
I am trying to translate some text using Google Translate API but every time I ... This is the API version that I...
Read more >
googletrans - PyPI
Free Google Translate API for Python. ... Googletrans is a free and unlimited python library that implemented Google ... Implement your feature or...
Read more >
the json object must be str bytes or bytearray not nonetype ...
I should that I got an error (red line blew googletrans and Translator) ... python %pip install googletrans==4.0.0-rc1 from lorem_text import lorem from ......
Read more >
Guide to Doing Translations in Python to Speed Up Your ...
There are a few ways to solve this problem: Ask a friend/colleague to translate for ... !pip install googletrans==4.0.0rc1 gwpy &> /dev/null.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found