I am new to Python. I have a problem but I do not know how to solve it.
My code:
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)
And when I run the program and I get this error message:
AttributeError: 'NoneType' object has no attribute 'group'
How can I resolve this?