JSONDecodeError using Google Translate API with Python3
问题 I've searched thoroughly on Stack Overflow but couldn't find an answer to this problem. I'm trying to use the Google Translate API (googletrans 2.2.0) for Python (3.6.2) and am trying to translate a set of non-English documents into English. I am letting Google Translate do the language detection. Here is my code: ## newcorpus is a corpus I have created consisting of non-english documents fileids = newcorpus.fileids for f in fileids: p = newcorpus.raw(f) p = str(p[:15000]) translated_text =