Googletrans library, how to use?

Hi,

I tried to use googletrans library, but for some reason it is not working see below:

Any clue?

Thank you.

Have you tried running the script locally and making sure you have the same version as anvil has installed on the server (v2.2.0)?

From a quick read on that library it does say only use it if you don’t mind something being potentially unstable…

1 Like

It worked fine in https://repl.it/languages/python3

Here is my app:

https://anvil.works/build#clone:RXTSYV5LA6E7T22D=MX52F6CY7EYOFHB5BTLJR7MI

Thank you.

I think what @stucork was asking was whether or not there is a version difference between what is running in anvil and what is running in the environment that it works in.

yes exactly - when I pip install googletrans==2.2.0 on my local machine I get the same error as you’re getting in the ide.

whereas in repl.it if you check the version by doing

print(googletrans.__version__)

you get 2.4.0

Since googletrans is self proclaimed as unstable you’ll need to request that anvil upgrade to the latest version to use a working version I guess…

2 Likes