1

我正在尝试使用 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)
4

1 回答 1

2

之前也遇到过,其实是因为API翻译的限制。。。我们需要等1天重置IP,改天再运行试试,应该可以了

于 2019-08-21T02:58:34.590 回答