Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't run this without internet because it tries to connect to "geolocation.onetrust.com". #44

Open
Atoli opened this issue Feb 9, 2024 · 2 comments

Comments

@Atoli
Copy link

Atoli commented Feb 9, 2024

Tried to run this without internet after installing and infering.

Got this error:

xttsWTF

It tries to connect to this website and many others.
This...is pretty shady, to be honest.
Why exactly is it contacting a geolocation site and others in order to run?

Can i run this TRULY locally, without any kind of contact to other websites?

@rhdunn
Copy link

rhdunn commented Feb 17, 2024

This is coming from https://github.com/UlionTse/translators/blob/c20c815ffe0ed75c551eef37d86055d8a8e435c7/translators/server.py#L303.

It is used by TranslatorsServer to initialize the Bing and Google translation service classes. That object is created and assigned to a global variable in that package.

This seems to be a way to handle cookie consent banners from servers in the EU. I.e. Google and Bing are checking where the server is (i.e. using the IP address) and showing a cookie consent banner unless that has been authorised.

Ideally, that project should:

  • use the same default region code as the Bing and Google classes when initializing TranslatorsServer as a constructor option;
  • add an API on TranslatorsServer to specify the region to use, allowing callers (such as this project) to set the region when needed (doing this would update the region on the Bing and Google classes) -- e.g. deferring the request to the first time a translation is performed;
  • or better yet, have a flag to enable region computation and compute the region when first trying to call the Bing or Google translation service.

@SyzGuru
Copy link

SyzGuru commented Mar 23, 2024

I have the same problem
I think it would need just some error handling when checking the translators connections.
Im no programmer specialist, but some kind of "on error resume" would do
for using all this in offline mode.
(Í hope they dont kick me out of github for this comment)

but the file is a compiled one, and i have no clue how to do

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants