How to solve googletrans AttributeError: ‘NoneType’ object has no attribute ‘group’ error
解决方法
pip uninstall googletrans
pip install googletrans==3.1.0a0
测试代码
from googletrans import Translator
detector = Translator()
dec_lan = detector.detect('이 문장은 한글로 쓰여졌습니다.')
print(dec_lan)
控制台输出
Detected(lang=ko, confidence=1.0)