Reputation: 49
Basically, I'm using google translate API to translate a few documents that need to be translated into as many languages as possible, phrase by phrase. It had worked previously without any hassle, but when I use it now I keep getting this error.
httpcore._exceptions.ConnectTimeout: timed out
the line in which this error is happening is:
word = Translator().translate(word_list[untrans_word], src=user_first_lang, dest=lang_to_translate_to)
This word
variable is in a function that translates the word and processes such that it fits into a list properly. untrans_word
is the untranslated word that needs to be translated. The rest of the program works fine. I know this as I've tried this before and it has worked smoothly. What could be the problem, and how do I fix it?
The documentation of Google Translate API python library.
Upvotes: 2
Views: 2974
Reputation: 21
Got the same issue. Re-run will fix it. This is not an official google cloud API which means google can any time closes the door. I have tried "try" and "close file" methods to save the content already translated and found not worth it.
Upvotes: 1