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

What setup is required to get Translate system tests running? #2063

Closed
tseaver opened this issue Aug 8, 2016 · 5 comments
Closed

What setup is required to get Translate system tests running? #2063

tseaver opened this issue Aug 8, 2016 · 5 comments
Assignees
Labels
api: translation Issues related to the Cloud Translation API API. testing type: question Request for information or clarification. Not an issue.

Comments

@tseaver
Copy link
Contributor

tseaver commented Aug 8, 2016

I have the Translate API enabled, but see the following when running tox -e system-tests:

======================================================================
ERROR: test_detect_language (translate.TestTranslate)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/tseaver/projects/agendaless/Google/src/gcloud-python/system_tests/translate.py", line 55, in test_detect_language
    detections = Config.CLIENT.detect_language(values)
  File "/home/tseaver/projects/agendaless/Google/src/gcloud-python/.tox/system-tests/lib/python2.7/site-packages/gcloud/translate/client.py", line 121, in detect_language
    method='GET', path='/detect', query_params=query_params)
  File "/home/tseaver/projects/agendaless/Google/src/gcloud-python/.tox/system-tests/lib/python2.7/site-packages/gcloud/connection.py", line 347, in api_request
    error_info=method + ' ' + url)
BadRequest: 400 Bad Request (GET https://www.googleapis.com/language/translate/v2/detect?key=None&q=takoy&q=fa%C3%A7ade&q=s%27il+vous+plait)

======================================================================
ERROR: test_get_languages (translate.TestTranslate)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/tseaver/projects/agendaless/Google/src/gcloud-python/system_tests/translate.py", line 43, in test_get_languages
    result = Config.CLIENT.get_languages()
  File "/home/tseaver/projects/agendaless/Google/src/gcloud-python/.tox/system-tests/lib/python2.7/site-packages/gcloud/translate/client.py", line 79, in get_languages
    method='GET', path='/languages', query_params=query_params)
  File "/home/tseaver/projects/agendaless/Google/src/gcloud-python/.tox/system-tests/lib/python2.7/site-packages/gcloud/connection.py", line 347, in api_request
    error_info=method + ' ' + url)
BadRequest: 400 Bad Request (GET https://www.googleapis.com/language/translate/v2/languages?key=None&target=en)

======================================================================
ERROR: test_translate (translate.TestTranslate)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/tseaver/projects/agendaless/Google/src/gcloud-python/system_tests/translate.py", line 65, in test_translate
    target_language='de')
  File "/home/tseaver/projects/agendaless/Google/src/gcloud-python/.tox/system-tests/lib/python2.7/site-packages/gcloud/translate/client.py", line 212, in translate
    method='GET', path='', query_params=query_params)
  File "/home/tseaver/projects/agendaless/Google/src/gcloud-python/.tox/system-tests/lib/python2.7/site-packages/gcloud/connection.py", line 347, in api_request
    error_info=method + ' ' + url)
BadRequest: 400 Bad Request (GET https://www.googleapis.com/language/translate/v2?key=None&target=de&q=hvala+ti&q=dankon&q=Me+llamo+Jeff&q=My+name+is+Jeff)

----------------------------------------------------------------------
@tseaver tseaver added type: question Request for information or clarification. Not an issue. testing api: translation Issues related to the Cloud Translation API API. labels Aug 8, 2016
@dhermes
Copy link
Contributor

dhermes commented Aug 8, 2016

key=None is the issue, there is a GCLOUD_TESTS_API_KEY env. var. set on Travis

@tseaver
Copy link
Contributor Author

tseaver commented Aug 8, 2016

The usage docs should probably point to the API docs for setting up the key (why doesn't the API support service accounts again?)

@dhermes
Copy link
Contributor

dhermes commented Aug 9, 2016

why doesn't the API support service accounts again?

@jgeewax


The usage docs should probably point to the API docs for setting up the key

From usage doc

screen shot 2016-08-09 at 10 10 19 am

which links out to https://cloud.google.com/translate/v2/translating-text-with-rest#auth which doesn't seem to exist anymore. Maybe we could use https://support.google.com/cloud/answer/6158862

@dhermes dhermes assigned tseaver and unassigned dhermes Sep 8, 2016
@dhermes
Copy link
Contributor

dhermes commented Sep 8, 2016

@tseaver Is this to remain open?

@tseaver
Copy link
Contributor Author

tseaver commented Sep 8, 2016

I think all of us are able to run the translate system tests, so we can close for my initial intention. The docs issue might stlll need to remain for our users, though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: translation Issues related to the Cloud Translation API API. testing type: question Request for information or clarification. Not an issue.
Projects
None yet
Development

No branches or pull requests

2 participants