bikenik / alfred-ldoce

Alfred-ldoce-anki
MIT License
34 stars 6 forks source link

Google Translate API causes to error when adding a word to Anki #9

Open ttuygun opened 5 years ago

ttuygun commented 5 years ago
[2019-04-10 15:01:16][utility.junction] Processing output of 'utility.filter' with arg '{
    "items": [
        {
            "title": "Error\n    at /usr/local/lib/node_modules/alfred-ldoce/node_modules/google-translate-api/index.js:105:17\n    at processTicksAndRejections (internal/process/task_queues.js:86:5)",
            "subtitle": "Press ⌘L to see the full error and ⌘C to copy it.",
            "valid": false,
            "text": {
                "copy": "```\nError\n    at /usr/local/lib/node_modules/alfred-ldoce/node_modules/google-translate-api/index.js:105:17\n```\n\n-\nldoce-Express 1.3.9\nAlfred 3.8.1\ndarwin x64 18.5.0",
                "largetype": "Error\n    at /usr/local/lib/node_modules/alfred-ldoce/node_modules/google-translate-api/index.js:105:17"
            },
            "icon": {
                "path": "/System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/AlertStopIcon.icns"
            }
        }
    ]
}
bikenik commented 5 years ago

Google tightened the restrictions and now from a single IP address can make very few queries, and blocks the translate requests for. The workflow might translate for you on a different internet connection.

This is a common issue: Alfred Forum GitHub (matheuss/google-translate-api): BAD_REQUEST response GitHub (matheuss/google-translate-api):BAD_NETWORK

Someone resolving this with the proxy. I'm using a VPN, so I avoid this issue, just by triggering another IP. I can't resolve this issue at the moment. Hope you'll find some solution by the links above.

ttuygun commented 5 years ago

I tried several hosts but none of them works with it. I think this feature can be optional or must be work without throwing an error.