Skip to content

Translation: AttributeError: module 'google.cloud.translate' has no attribute 'Client' #9545

@fluttery1

Description

@fluttery1
client = translate.Client()
AttributeError: module 'google.cloud.translate' has no attribute 'Client'

i made a virtual env also tried global env but the error is same.i have tried google logging as well but error is same.using this sample code.

from google.cloud import translate
client = translate.Client()
client.get_languages()
[
    {
        'language': 'af',
        'name': 'Afrikaans',
    },
     ...
]
client.detect_language(['Me llamo', 'I am'])
[
    {
        'confidence': 0.25830904,
        'input': 'Me llamo',
        'language': 'es',
    }, {
        'confidence': 0.17112699,
        'input': 'I am',
        'language': 'en',
    },
]

Metadata

Metadata

Assignees

Labels

api: translationIssues related to the Cloud Translation API API.type: 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