问题
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.
来源:https://stackoverflow.com/questions/62870783/what-is-httpcore-exceptions-connecttimeout-timed-out-error-supposed-to-mean