Skip to content

Empty translation result and no exception raised #5

Open
@kdorichev

Description

@kdorichev

deepl.version == '1.15.0'

try:
    result = translator.translate_text(
        "把警车还给我这是妈妈给我买的,我的就不给你玩啦啦啦啦啦啦妈妈,哥哥打警车抢走了,那是我的。", 
        source_lang='ZH', target_lang='EN'
    )
except deepl.exceptions.ConnectionException:
    error("Translation error", "Connection exaeption")
except deepl.exceptions.QuotaExceededException:
    error("Translation error", "Quota exceeded")
except deepl.exceptions.DeepLException:
    error("Translation error", "DeepL Exception")
else:
    if len(result.text) == 0:
        print('EMPTY result')
    else:
        print(result.text)

EMPTY result

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions