Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get error message in translate #3

Open
szkane opened this issue Apr 15, 2017 · 4 comments
Open

Get error message in translate #3

szkane opened this issue Apr 15, 2017 · 4 comments

Comments

@szkane
Copy link

szkane commented Apr 15, 2017

Error in workflow 'com.sozora.google-translate'
http error 403: forbidden

@szkane
Copy link
Author

szkane commented Apr 15, 2017

google api setting:

HTTP referrers (web sites)

referres is require!!!

You have not set any referrers. Other applications might be able to use this key.

@sepehr
Copy link

sepehr commented Apr 19, 2017

I'm getting a 403 forbidden error as well. My API key had no restrictions. Here's the debug log:

[2017-04-19 16:46:50][ERROR: input.scriptfilter] Code 1: 16:46:48 workflow.py:2189 DEBUG    Workflow version : 1.1.2
16:46:48 workflow.py:1596 DEBUG    Reading settings from `/Users/Sepehr/Library/Application Support/Alfred 3/Workflow Data/com.sozora.google-translate/settings.json` ...
16:46:48 workflow.py:2474 DEBUG    Update check not due
16:46:48 workflow.py:1827 DEBUG    Loading cached data from : /Users/Sepehr/Library/Caches/com.runningwithcrayons.Alfred-3/Workflow Data/com.sozora.google-translate/__workflow_update_status.cpickle
16:46:48 workflow.py:2404 DEBUG    update_data : {u'available': False}
16:46:49 workflow.py:2593 DEBUG    Got password : com.sozora.google-translate:google_translate_api_key
16:46:49 workflow.py:2593 DEBUG    Got password : com.sozora.google-translate:google_translate_api_key
16:46:50 workflow.py:2207 ERROR    HTTP Error 403: Forbidden
Traceback (most recent call last):
  File "/Users/Sepehr/Dropbox/dev/dotfiles/conf/app/alfred/Alfred.alfredpreferences/workflows/user.workflow.E919DD38-72D8-4DA4-ACAF-2D49A8BB2D88/workflow/workflow.py", line 2200, in run
    func(self)
  File "base_translate.py", line 102, in main
    translations = api.get_translations()
  File "/Users/Sepehr/Dropbox/dev/dotfiles/conf/app/alfred/Alfred.alfredpreferences/workflows/user.workflow.E919DD38-72D8-4DA4-ACAF-2D49A8BB2D88/google_translate.py", line 102, in get_translations
    max_age=MAX_AGE_CACHE)
  File "/Users/Sepehr/Dropbox/dev/dotfiles/conf/app/alfred/Alfred.alfredpreferences/workflows/user.workflow.E919DD38-72D8-4DA4-ACAF-2D49A8BB2D88/workflow/workflow.py", line 1833, in cached_data
    data = data_func()
  File "/Users/Sepehr/Dropbox/dev/dotfiles/conf/app/alfred/Alfred.alfredpreferences/workflows/user.workflow.E919DD38-72D8-4DA4-ACAF-2D49A8BB2D88/google_translate.py", line 50, in __get_translations
    raise e
HTTPError: HTTP Error 403: Forbidden
16:46:50 workflow.py:2231 DEBUG    Workflow finished in 1.088 seconds.
[2017-04-19 16:46:51][ERROR: input.scriptfilter] Code 1: 16:46:50 workflow.py:2189 DEBUG    Workflow version : 1.1.2
16:46:50 workflow.py:1596 DEBUG    Reading settings from `/Users/Sepehr/Library/Application Support/Alfred 3/Workflow Data/com.sozora.google-translate/settings.json` ...
16:46:50 workflow.py:2474 DEBUG    Update check not due
16:46:50 workflow.py:1827 DEBUG    Loading cached data from : /Users/Sepehr/Library/Caches/com.runningwithcrayons.Alfred-3/Workflow Data/com.sozora.google-translate/__workflow_update_status.cpickle
16:46:50 workflow.py:2404 DEBUG    update_data : {u'available': False}
16:46:50 workflow.py:2593 DEBUG    Got password : com.sozora.google-translate:google_translate_api_key
16:46:50 workflow.py:2593 DEBUG    Got password : com.sozora.google-translate:google_translate_api_key
16:46:51 workflow.py:2207 ERROR    HTTP Error 403: Forbidden
Traceback (most recent call last):
  File "/Users/Sepehr/Dropbox/dev/dotfiles/conf/app/alfred/Alfred.alfredpreferences/workflows/user.workflow.E919DD38-72D8-4DA4-ACAF-2D49A8BB2D88/workflow/workflow.py", line 2200, in run
    func(self)
  File "base_translate.py", line 102, in main
    translations = api.get_translations()
  File "/Users/Sepehr/Dropbox/dev/dotfiles/conf/app/alfred/Alfred.alfredpreferences/workflows/user.workflow.E919DD38-72D8-4DA4-ACAF-2D49A8BB2D88/google_translate.py", line 102, in get_translations
    max_age=MAX_AGE_CACHE)
  File "/Users/Sepehr/Dropbox/dev/dotfiles/conf/app/alfred/Alfred.alfredpreferences/workflows/user.workflow.E919DD38-72D8-4DA4-ACAF-2D49A8BB2D88/workflow/workflow.py", line 1833, in cached_data
    data = data_func()
  File "/Users/Sepehr/Dropbox/dev/dotfiles/conf/app/alfred/Alfred.alfredpreferences/workflows/user.workflow.E919DD38-72D8-4DA4-ACAF-2D49A8BB2D88/google_translate.py", line 50, in __get_translations
    raise e
HTTPError: HTTP Error 403: Forbidden
16:46:51 workflow.py:2231 DEBUG    Workflow finished in 0.739 seconds.

@rustycamper
Copy link
Owner

rustycamper commented Apr 19, 2017 via email

@sepehr
Copy link

sepehr commented Apr 19, 2017

Thank you @rustycamper for clarifying this.

I had a credit card on file but hadn't enabled the billing for my GCP account. Now, that I did, it started working.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants