help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: google-translate-core-ui: Contacting host: translate.google.com:80 (


From: Emanuel Berg
Subject: Re: google-translate-core-ui: Contacting host: translate.google.com:80 (json-readtable-error) in json-read
Date: Sun, 29 Nov 2015 22:15:19 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux)

Emanuel Berg <embe8573@student.uu.se> writes:

> With version: 0.11.1 of google-translate-core-ui, when
> using `google-translate-translate', I quite often, but
> not always, get the following message:
>
>     Contacting host: translate.google.com:80
> (json-readtable-error) in json-read
>
> That sounds like something web-programming Java-ish
> (?) so I suppose the error is not "with us". Still, it
> doesn't work and it is a bit annoying when it
> doesn't work in the wrong moment and you loose
> your mindefullmollyness.

Andrey Tykhonov <atykhonov@gmail.com> writes:

> The newest v0.11.2 version has been released on Oct
> 16. Since this fix I haven't experienced
> `json-readtable-error` and haven't received any bug
> report about it. It works correctly.

OK!

> But, as was explained by you, JSON schema may be
> changed anytime in the future and `google-translate`
> will be required to be fixed with another patch.

Yeah, actually I don't have a problem with this.

I have ~such code myself, for example this demo [1].
If the database homepage changes the order of the
data, or if taken down altogether - neither of which
I can influence in the least - if that happens it
won't work, still, I think it'll be a quick fix to
change the order or find another site offering
the same.

So I *like* the idea of not having to use their
interface, but only their service, by doing a *new*
interface that uses their interface!

> So, Emanuel please, if you'll be experiencing such
> an issue anytime in the feature, just let me know.

100%.

> Just file an issue on github or write email to
> `emacs-helps` or just email me to this private email
> address -- choose any most convenient way to report
> an issue.

Speaking of gmane.emacs.help, I think you only
answered to me privately (?). It is good to have the
answers on the list/newsgroup/web-archive as well, as
people might have the same problem, or they might
Google it in the future - in general, it is good for
people just to know about your software and that bugs
are fixed and what the latest stuff is. So, below this
I yank your replies, and then I send this message to
gmane.emacs.help as well as private mails to both
of you.

[1] http://user.it.uu.se/~embe8573/conf/emacs-init/isbn.el

-

    With the version 0.11.1 I was constantly getting
    `json-readtable-error`. Something was changed on
    the side of translate.google.com. And I've tried
    to resolve it and submitted the patch with which
    it works well now (at least for me and several
    users which confirmed in github).

    Please try 0.11.2 version (it contains mentioned
    patch). It should work. Otherwise please let
    me know.

-

    I no longer maintain the package (Andrey does),
    but I wanted to point out that it has always been
    a hack. It doesn't use any official Google
    Translate API; instead, it makes queries to
    translate.google.com, the same URL you go to when
    you use Google Translate in the browser.
    When I came up with the idea of the package
    I inspected the JSON response for a bunch of
    queries and tried to guess which parts of the JSON
    correspond to which parts of the info displayed in
    the UI. Naturally, with this approach it should be
    expected that the package may break if Google
    choose to change the JSON schema, which is what
    has happened. Fortunately, once this change has
    been detected, it should be relatively easy to
    reverse engineer it and fix the package, which
    Andrey says he has done in v0.11.2.

-

    Yes, that's right Oleksandr. The newest v0.11.2
    version has been released on Oct 16. Since this
    fix I haven't experienced `json-readtable-error`
    and haven't received any bug report about it.
    It works correctly. But, as was explained by you,
    JSON schema may be changed anytime in the future
    and `google-translate` will be required to be
    fixed with another patch. So, Emanuel please, if
    you'll be experiencing such an issue anytime in
    the feature, just let me know. Just file an issue
    on github or write email to `emacs-helps` or just
    email me to this private email address -- choose
    any most convenient way to report an issue.
    And I'll do my best to fix it. 

-- 
underground experts united
http://user.it.uu.se/~embe8573




reply via email to

[Prev in Thread] Current Thread [Next in Thread]