From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Emanuel Berg Newsgroups: gmane.emacs.help 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 Message-ID: <87mvtwtsm0.fsf@debian.uxu> References: <87vb8lgzhh.fsf@debian.uxu> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1448831142 7120 80.91.229.3 (29 Nov 2015 21:05:42 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 29 Nov 2015 21:05:42 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Nov 29 22:05:31 2015 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1a39A2-0005fN-KD for geh-help-gnu-emacs@m.gmane.org; Sun, 29 Nov 2015 22:05:30 +0100 Original-Received: from localhost ([::1]:37700 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a39A6-0003gf-Ee for geh-help-gnu-emacs@m.gmane.org; Sun, 29 Nov 2015 16:05:34 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33284) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a399n-0003da-9y for help-gnu-emacs@gnu.org; Sun, 29 Nov 2015 16:05:16 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a399i-0000U9-9J for help-gnu-emacs@gnu.org; Sun, 29 Nov 2015 16:05:15 -0500 Original-Received: from plane.gmane.org ([80.91.229.3]:55986) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a399h-0000U1-V3 for help-gnu-emacs@gnu.org; Sun, 29 Nov 2015 16:05:10 -0500 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1a399b-0004hi-6q for help-gnu-emacs@gnu.org; Sun, 29 Nov 2015 22:05:03 +0100 Original-Received: from nl106-137-244.student.uu.se ([130.243.137.244]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 29 Nov 2015 22:05:03 +0100 Original-Received: from embe8573 by nl106-137-244.student.uu.se with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 29 Nov 2015 22:05:03 +0100 X-Injected-Via-Gmane: http://gmane.org/ Mail-Followup-To: help-gnu-emacs@gnu.org Original-Lines: 118 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: nl106-137-244.student.uu.se Mail-Copies-To: never User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux) Cancel-Lock: sha1:ghPB+dFFWlIQF0Omd0lgQYr5qg4= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:108251 Archived-At: Emanuel Berg 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 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