我正在尝试使用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)
答案 0 :(得分:0)
我以前遇到过它,这实际上是因为使用API进行翻译的限制...我们需要等待1天才能重置IP,您可以尝试另一天来运行它,这可能是可行的< / p>