Hi All,
I’m using google translator but it stopped working all of a sudden, the error stack I get is:
AnvilWrappedError: ‘NoneType’ object has no attribute ‘group’
at /usr/local/lib/python3.7/site-packages/googletransx/gtoken.py, line 65
called from /usr/local/lib/python3.7/site-packages/googletransx/gtoken.py, line 200
called from /usr/local/lib/python3.7/site-packages/googletransx/client.py, line 76
called from /usr/local/lib/python3.7/site-packages/googletransx/client.py, line 180
the code I use is :
def translate(self):
text = “Ainsi, les salons se parent de bougies et de sapins”
anvil.server.call(‘Translate’,text, ‘fr’)
@anvil.server.callable
def Translate (Text,SourceLanguage):
from googletransx import Translator
translator = Translator()
print( translator.translate(Text, src= SourceLanguage, dest=‘en’))
Many thanks
Soadad