hubot-google-translate icon indicating copy to clipboard operation
hubot-google-translate copied to clipboard

Failed to parse GAPI response

Open veronism opened this issue 9 years ago • 26 comments

Hi,

I keep getting this error and I'm not sure if I did something wrong. Help please?

veronism avatar Sep 02 '15 14:09 veronism

+1 Translating to Urdu, and Japanese

amingilani avatar Sep 06 '15 12:09 amingilani

+1 here as well

sammarx avatar Sep 08 '15 19:09 sammarx

Occurs for me as well, using the default samples from the documentation.

doque avatar Sep 15 '15 14:09 doque

+1

DBowlerHB avatar Sep 30 '15 16:09 DBowlerHB

+1

kelvah avatar Oct 08 '15 10:10 kelvah

+1

alanwill avatar Oct 15 '15 19:10 alanwill

+1

bmjjr avatar Nov 15 '15 05:11 bmjjr

+1

jazzytomato avatar Nov 25 '15 17:11 jazzytomato

might be related to Google blocking requests - happened to me after 5 minutes of usage

callmephilip avatar Nov 26 '15 16:11 callmephilip

+1

law avatar Jan 23 '16 09:01 law

The problem is that the shared hosted cloud services that we use (heroku, openshift etc) route their traffic to google via the same IP, so no wonder we hit the limit quickly. No easy fix then :

  • change the hosting provider to have a dedicated IP or host it yourself
  • set up a proxy server to route google api requests through this proxy

jazzytomato avatar Jan 23 '16 11:01 jazzytomato

I have this set up on a dedicated server, with a dedicated IP address, and it's still giving me this error. Is there some kind of API key that could be used to help avoid issues like this?

seeruk avatar Jan 25 '16 20:01 seeruk

i switched to Bing Translate - https://www.microsoft.com/en-us/translator/translatorapi.aspx

callmephilip avatar Jan 25 '16 23:01 callmephilip

Fixed in #9

kkpoon avatar Jan 28 '16 02:01 kkpoon

Another implementation to use Microsoft Translator is here: https://github.com/kkpoon/hubot-microsoft-translator

kkpoon avatar Jan 28 '16 02:01 kkpoon

+1

dkinzer avatar Jan 30 '16 21:01 dkinzer

#11 fixes this. For a temporary fix, you can use the fork in your project:

"dependencies": {
    "hubot-google-translate": "awailly/hubot-google-translate#fix-tests"
},

pchaigno avatar Mar 10 '16 21:03 pchaigno

"dependencies": { "hubot-google-translate": "awailly/hubot-google-translate#fix-tests", },

It didn't work .

khoi-thinh avatar Mar 17 '16 10:03 khoi-thinh

@thinhduckhoi See pchaigno/hewbot for a better example. If you can't figure it out, don't hesitate to open an issue at awailly/hubot-google-translate ;)

pchaigno avatar Mar 17 '16 11:03 pchaigno

Ah sorry, man. It worked! I put that code in the wrong place. T_T

khoi-thinh avatar Mar 18 '16 02:03 khoi-thinh

awailly/hubot-google-translate isn't working here :(

I receive this response:

`p>403. That’s an error.

Your client does not have permission to get URL /translate_a/single?client=t&hl=en&sl=auto&ssel=0&tl=en&tsel=0&q=%22%22&ie=UTF-8&oe=UTF-8&otf=1&dt=bd&dt=ex&dt=ld&dt=md&dt=qca&dt=rw&dt=rm&dt=ss&dt=t&dt=at&tk=36960.440312 from this server. That’s all we know. `

Am I doing something wrong? Or this fix is just not working anymore?

nickollascoelho avatar May 23 '16 18:05 nickollascoelho

@nickollascoelho Could you open an issue on awailly/hubot-google-translate and will try to fix it when we have a bit of time?

pchaigno avatar May 24 '16 06:05 pchaigno

I'm getting the same problem even when applying the fix in package.json. Failed to parse GAPI response using the same examples in the documentation.

snazzybunny avatar Sep 01 '16 21:09 snazzybunny

@andyph666 The fix doesn't work anymore. Not sure if it's worth fixing it again :/

pchaigno avatar Sep 01 '16 21:09 pchaigno

Thanks for letting me know. It was driving me nuts!

snazzybunny avatar Sep 01 '16 21:09 snazzybunny

View Google Translate request and replace query paramters. I don't know what is the meaning of the parameters, but it's work.

client:t
sl:en
tl:zh-CN
hl:zh-CN
dt:at
dt:bd
dt:ex
dt:ld
dt:md
dt:qca
dt:rw
dt:rm
dt:ss
dt:t
ie:UTF-8
oe:UTF-8
source:bh
ssel:0
tsel:0
kc:1
tk:986736.609086
q:about

743v45 avatar Nov 18 '16 06:11 743v45