atykhonov/google-translate

google-translate-backend--emacs: Search failed

aadcg opened this issue · 13 comments

aadcg commented

Hi,

I've been using this package for a while and I remember it was working.
However, I'm getting the following error now (copied from *Messages*):

Contacting host: translate.google.com:80
google-translate-backend--emacs: Search failed: "

"

In *google-translate-backend-debug* I get:

Sun Aug 25 11:08:37 2019
("http://translate.google.com/" emacs)
-- begin --

-- end --

Do you have any ideas on this error?

Versions:
Ubuntu 19.04
Emacs 26.1

ag91 commented

I have got the same issue.
Essentially

(url-retrieve-synchronously "http://translate.google.com/")

is not creating a buffer and the search for '"tkk':" is failing.
This is breaking the call:

(google-translate-backend-retrieve google-translate--tkk-url) in google-translate-tk.el.

(Strangely enough the asynchronous version works: (url-retrieve "http://translate.google.com/" (lambda (x) (message "Buffer: %s" (buffer-substring-no-properties (point-min) (point-max))))) - maybe a problem of the latest version of Emacs itself?)

@aadcg can you confirm that if you change the backend method you get a new error:
for instance I get the error, condition-case: JSON readtable error: 60 if I set:
(setq google-translate-backend-method 'curl)

aadcg commented

Well, things started to work for me again... not sure why. And for you, @ag91 ?

ag91 commented

Lol, it seems same for me...
Maybe something wrong on google side? And we disturb these nice folks of google-translate.el ;)

aadcg commented

Yes, maybe google...
At least we saw it together so none of us hallucinated!
I'm closing this issue.

I am re-opening this since I am still experiencing the problem with the same error.

aadcg commented

That makes two of us. Any ideas?

ag91 commented

what is your value of google-translate-backend-method?

aadcg commented

emacs. I changed to curl and it works for me. What about you?

ag91 commented

I moved to curl as well for safety, because on another machine I could still observe the error.

Same here, with emacs fails, but with curl it works.

I can't reproduce this problem on my machine, can somebody provide some detailed info like Edebug.
You can check out following link to learn it if you don't know how to use Edebug.

aadcg commented

Everything's working for me. I'm closing this.

(setq google-translate-backend-method 'curl)