【发布时间】:2021-05-28 10:41:11
【问题描述】:
我是 Python 新手。我有一个问题,但我不知道如何解决。
我的代码:
from googletrans import Translator
translator: Translator = Translator()
result ='''The core library includes the data types, variables and literals, etc.
The standard library includes the set of functions manipulating strings, files, etc.
The Standard Template Library (STL) includes the set of methods manipulating a data structure.'''
dt = translator.detect(result)
print(dt)
当我运行程序并收到以下错误消息:
AttributeError: 'NoneType' object has no attribute 'group'
我该如何解决这个问题?
【问题讨论】:
标签: python translation google-translate translate