Trouble Shooting
[ 오류 해결 ] (googletrans) AttributeError: 'NoneType' object has no attribute 'group'
Theo (테오)
2023. 1. 26. 17:26
반응형
아래와 같이 pip 를 이용하여 googletrans 설치를 진행하면 3.0.0 버전으로 설치가 됩니다.
pip install googletrans

하지만 googletrans의 translate() method나 detect() method 를 호출하면 아래와 같은 오류가 발생합니다.

...
...
code = self.RE_TKK.search(r.text).group(1).replace('var ', '')
AttributeError: 'NoneType' object has no attribute 'group'
gtoken.py 의 _update() 내부의 오류가 있습니다. 4.0.0rc1 버전은 이 오류가 수정되었으니 uninstall 후 해당 버전으로 재설치하면 됩니다.

pip uninstall googletrans
pip install googletrans==4.0.0rc1
반응형