我正在尝试使用 googletrans 翻译文本。
直到昨天它工作正常。
今天报错了:
Googletrans 引发错误:json.decoder.JSONDecodeError:预期值:第 1 行第 1 列(字符 0)
我已经在不同的系统上尝试过代码,但它不起作用。这是我的代码。
我上周使用 googletrans 进行翻译。它从来没有给出过这种类型的错误。今天才报错。
from googletrans import Translator
translator=Translator()
translator.translate(text='hello', dest='de').text
Output:
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)