1

I am working on a project in Python and I was using googletrans library to translate from one language to another. 5 mins ago, the program was working, but now I get a json error... I also tried a simple translation to see where lies the problem. I attached the printscreen here. https://snipboard.io/DL9soX.jpg

Simple demo code:

from googletrans import Translator
translator = Translator()
translator.translate('Hello')

6
  • 1
    The error might be related to the characters that you are giving it. Try translating some simple text like "hello" and see if the error persists. Commented Dec 7, 2019 at 14:56
  • (1). Please post the code, don't post picture. (2). I tried the code in official repo (github.com/ssut/py-googletrans) and it works fine. As @dnorhoj said, try testing with simpler stuff first. Commented Dec 7, 2019 at 14:59
  • @dnorhoj it is the same error no matter what I give it to translate: snipboard.io/c0oilp.jpg Commented Dec 7, 2019 at 15:00
  • @RahulBharadwaj I have updated the description. Commented Dec 7, 2019 at 15:02
  • Huh that's so weird it works fine for me. Commented Dec 7, 2019 at 15:02

1 Answer 1

2

From Googletrans 2.3.0 documentation

Note on library usage

  • Due to limitations of the web version of google translate, this API does not guarantee that the library would work properly at all times. (so please use this library if you don’t care about stability.)
  • If you want to use a stable API, I highly recommend you to use Google’s official translate API.
  • If you get HTTP 5xx error or errors like #6, it’s probably because Google has banned your client IP address.
Sign up to request clarification or add additional context in comments.

1 Comment

But also: "Googletrans is a free and unlimited python library"...

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.