【问题标题】:Googletrans raising an error: json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)Googletrans 引发错误:json.decoder.JSONDecodeError:预期值:第 1 行第 1 列(字符 0)
【发布时间】:2019-06-10 07:32:22
【问题描述】:

我正在尝试使用 googletrans 翻译文本。

到昨天为止一切正常。

今天报错了:

Googletrans 引发错误:json.decoder.JSONDecodeError:预期值:第 1 行第 1 列 (char 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)

【问题讨论】:

标签: python-3.x google-translate google-translation-api


【解决方案1】:

我之前也遇到过,其实是因为API翻译的限制...我们需要等待1天重置IP,你可以尝试另一天运行它,它可能会工作

【讨论】:

    猜你喜欢
    • 2019-11-06
    • 2020-01-02
    • 1970-01-01
    • 2019-09-10
    • 2016-03-03
    • 2020-08-16
    • 1970-01-01
    • 1970-01-01
    • 2021-04-27
    相关资源
    最近更新 更多