Skip to content

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

Description

@tseaver

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

======================================================================ERROR: test_detect_language (translate.TestTranslate)
----------------------------------------------------------------------Traceback (mostrecentcalllast):
File"/home/tseaver/projects/agendaless/Google/src/gcloud-python/system_tests/translate.py", line55, intest_detect_languagedetections=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", line121, indetect_languagemethod='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", line347, inapi_requesterror_info=method+' '+url)
BadRequest: 400BadRequest (GEThttps://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 (mostrecentcalllast):
File"/home/tseaver/projects/agendaless/Google/src/gcloud-python/system_tests/translate.py", line43, intest_get_languagesresult=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", line79, inget_languagesmethod='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", line347, inapi_requesterror_info=method+' '+url)
BadRequest: 400BadRequest (GEThttps://www.googleapis.com/language/translate/v2/languages?key=None&target=en)
======================================================================ERROR: test_translate (translate.TestTranslate)
----------------------------------------------------------------------Traceback (mostrecentcalllast):
File"/home/tseaver/projects/agendaless/Google/src/gcloud-python/system_tests/translate.py", line65, intest_translatetarget_language='de')
File"/home/tseaver/projects/agendaless/Google/src/gcloud-python/.tox/system-tests/lib/python2.7/site-packages/gcloud/translate/client.py", line212, intranslatemethod='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", line347, inapi_requesterror_info=method+' '+url)
BadRequest: 400BadRequest (GEThttps://www.googleapis.com/language/translate/v2?key=None&target=de&q=hvala+ti&q=dankon&q=Me+llamo+Jeff&q=My+name+is+Jeff)
----------------------------------------------------------------------

Metadata

Metadata

Assignees

Labels

api: translationIssues related to the Cloud Translation API API.testingtype: questionRequest for information or clarification. Not an issue.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions