-
Notifications
You must be signed in to change notification settings - Fork 14
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
failed to reach server #19
Comments
@schepens83 - I tried your code and did not receive the same error. I'm guessing you possibly have a DNS or network issue. If you try to I am seeing a different error:
But this is due to Google changing the interface for the translation tool. Hopefully there will be an easy way to accommodate their changes. Let me know about the network/DNS thing. |
Something I also noticed in your code:
When you use
You'll probably want to do something like this:
which will give you:
|
The changes to the translator web interface are now accommodated with PR #21 |
Closing this issue as I believe it is local DNS or network related. |
Hi Midwire Indeed strange. If I ping https://translate.google.com it doesn't know the service. If i paste it in the browser it just works. If I ping translate.google.com it does work. Similar for other websites - if I put https:// in front it doesnt work from the terminal. |
Ping won't resolve a URL with the |
You can also try this |
I'm at home. Not any firewall or NAT that I'm aware of. |
Ah followed this https://serverfault.com/questions/502668/check-for-firewall-nat-on-network |
Well, that makes it interesting then. This is the first time anyone has reported this kind of issue, and if that curl command works, the gem should work. There is another open Issue #18 which requests proxy support. That may help you as well. Let me research a bit. |
@schepens83 your NAT should be OK, but it seems like you may be using some kind of proxy (socks5 or http). After doing some research, I can reproduce your issue if I configure a proxy. Unfortunately there is not an easy way for me to tell if you are using one. You can search for "determine if you are using a proxy" in your search engine of choice to see if that helps making the determination. PhantomJS can be very finicky about proxies, which is why I've not gotten a working branch with proxy usage yet. Ultimately if you find you are using a proxy and can disable it, you should be able to use tr4n5l4te. This issue is most definitely network-related and not code-related. Let me know if I can help further. |
@midwire yes thanks. I think that's the case. I share my internet with my parents next door and pass 2 routers to the internet. Probably this. I'll set it up on a server and should work then. thanks for the effort. |
You are welcome. 👍🏼 |
Expected Behavior
=> hola
=> cómo estás
Actual Behavior
Traceback (most recent call last):
9: from translate.rb:12:in
<main>' 8: from translate.rb:12:in
each'7: from translate.rb:13:in
block in <main>' 6: from /home/sander/.rvm/gems/ruby-2.7.0/gems/tr4n5l4te-0.1.9/lib/tr4n5l4te/translator.rb:20:in
translate'5: from /home/sander/.rvm/gems/ruby-2.7.0/gems/tr4n5l4te-0.1.9/lib/tr4n5l4te/translator.rb:58:in
smart_visit' 4: from /home/sander/.rvm/gems/ruby-2.7.0/gems/tr4n5l4te-0.1.9/lib/tr4n5l4te/agent.rb:75:in
visit'3: from /home/sander/.rvm/gems/ruby-2.7.0/gems/capybara-2.18.0/lib/capybara/session.rb:274:in
visit' 2: from /home/sander/.rvm/gems/ruby-2.7.0/gems/poltergeist-1.18.1/lib/capybara/poltergeist/driver.rb:100:in
visit'1: from /home/sander/.rvm/gems/ruby-2.7.0/gems/poltergeist-1.18.1/lib/capybara/poltergeist/browser.rb:39:in
visit' /home/sander/.rvm/gems/ruby-2.7.0/gems/poltergeist-1.18.1/lib/capybara/poltergeist/browser.rb:396:in
command': Request to 'https://translate.google.com/#en/es/hello' failed to reach server, check DNS and/or server status (Capybara::Poltergeist::StatusFailError)Steps to reproduce the problem
bundle init, and added your gem. bundle install. created translate.rb:
ruby translate.rb
The text was updated successfully, but these errors were encountered: