py-googletrans icon indicating copy to clipboard operation
py-googletrans copied to clipboard

Deprecated project, no longer working, cannot even detect English

Open xuancong84 opened this issue 1 year ago • 1 comments
trafficstars

>>> tt.detect('hello')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/xuancong/projects/py-googletrans/googletrans/client.py", line 262, in detect
    data, response = self._translate(text, 'en', 'auto', kwargs)
  File "/home/xuancong/projects/py-googletrans/googletrans/client.py", line 80, in _translate
    token = self.token_acquirer.do(text)
  File "/home/xuancong/projects/py-googletrans/googletrans/gtoken.py", line 194, in do
    self._update()
  File "/home/xuancong/projects/py-googletrans/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'

xuancong84 avatar Feb 24 '24 15:02 xuancong84