Python Googletrans API错误';非类型';对象没有属性';集团';
我每天都用谷歌的API, 但不幸的是,我今天收到了这个错误代码 谷歌正在更新API吗? 请帮我解决这个问题Python Googletrans API错误';非类型';对象没有属性';集团';,python,Python,我每天都用谷歌的API, 但不幸的是,我今天收到了这个错误代码 谷歌正在更新API吗? 请帮我解决这个问题 ~\AppData\Local\Programs\Python\Python38-32\lib\site-packages\googletrans\client.py in translate(self, text, dest, src, **kwargs) 180 181 origin = text --> 182 data = s
~\AppData\Local\Programs\Python\Python38-32\lib\site-packages\googletrans\client.py in translate(self, text, dest, src, **kwargs)
180
181 origin = text
--> 182 data = self._translate(text, dest, src, kwargs)
183
184 # this code will be updated when the format is changed.
~\AppData\Local\Programs\Python\Python38-32\lib\site-packages\googletrans\client.py in _translate(self, text, dest, src, override)
76
77 def _translate(self, text, dest, src, override):
---> 78 token = self.token_acquirer.do(text)
79 params = utils.build_params(query=text, src=src, dest=dest,
80 token=token, override=override)
~\AppData\Local\Programs\Python\Python38-32\lib\site-packages\googletrans\gtoken.py in do(self, text)
192
193 def do(self, text):
--> 194 self._update()
195 tk = self.acquire(text)
196 return tk
~\AppData\Local\Programs\Python\Python38-32\lib\site-packages\googletrans\gtoken.py in _update(self)
60
61 # this will be the same as python code after stripping out a reserved word 'var'
---> 62 code = self.RE_TKK.search(r.text).group(1).replace('var ', '')
63 # unescape special ascii characters such like a \x3d(=)
64 code = code.encode().decode('unicode-escape')
AttributeError: 'NoneType' object has no attribute 'group'
尝试切换到
它具有与谷歌API相同的功能,并且运行良好。实际上,网站上有一个关于它的网站。