You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
└─$ python3.9 translate_to_other_languages.py Traceback (most recent call last): File "/mnt/d/translate_to_other_languages.py", line 5, in translator.detect('이 문장은 한글로 쓰여졌습니다.') File "/home/kali/.local/lib/python3.9/site-packages/googletrans/client.py", line 255, in detect data = self._translate(text, 'en', 'auto', kwargs) File "/home/kali/.local/lib/python3.9/site-packages/googletrans/client.py", line 78, in _translate token = self.token_acquirer.do(text) File "/home/kali/.local/lib/python3.9/site-packages/googletrans/gtoken.py", line 194, in do self._update() File "/home/kali/.local/lib/python3.9/site-packages/googletrans/gtoken.py", line 62, in _update code = self.RE_TKK.search(r.text).group(1).replace('var ', '') AttributeError: 'NoneType' object has no attribute 'group'
import googletrans
from googletrans.constants import LANGUAGES
translator = googletrans.Translator()
translator.detect('이 문장은 한글로 쓰여졌습니다.')
translator.translate('안녕하세요.')
for short_code in LANGUAGES.keys():
print(short_code)
try:
print(translator.translate("хуй", dest=short_code))
except Exception as e:
print(e)
The text was updated successfully, but these errors were encountered:
└─$ python3.9 translate_to_other_languages.py Traceback (most recent call last): File "/mnt/d/translate_to_other_languages.py", line 5, in translator.detect('이 문장은 한글로 쓰여졌습니다.') File "/home/kali/.local/lib/python3.9/site-packages/googletrans/client.py", line 255, in detect data = self._translate(text, 'en', 'auto', kwargs) File "/home/kali/.local/lib/python3.9/site-packages/googletrans/client.py", line 78, in _translate token = self.token_acquirer.do(text) File "/home/kali/.local/lib/python3.9/site-packages/googletrans/gtoken.py", line 194, in do self._update() File "/home/kali/.local/lib/python3.9/site-packages/googletrans/gtoken.py", line 62, in _update code = self.RE_TKK.search(r.text).group(1).replace('var ', '') AttributeError: 'NoneType' object has no attribute 'group'
import googletrans
from googletrans.constants import LANGUAGES
translator = googletrans.Translator()
translator.detect('이 문장은 한글로 쓰여졌습니다.')
translator.translate('안녕하세요.')
for short_code in LANGUAGES.keys():
print(short_code)
try:
print(translator.translate("хуй", dest=short_code))
except Exception as e:
print(e)
The text was updated successfully, but these errors were encountered: