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

AttributeError: 'TranslationServiceClient' object has no attribute 'location_path' #4616

Closed
AhmedSamyMerah opened this issue Sep 2, 2020 · 3 comments · Fixed by #4617
Closed
Assignees
Labels
samples Issues that are directly related to samples. triage me I really want to be triaged.

Comments

@AhmedSamyMerah
Copy link

Issue in following path

python-docs-samples/translate/cloud-client/translate_v3_translate_text.py

I keep getting the following issue when trying to call the Translation API to make a simple translation, I tried changing to locationPath as mentioned in documentation but to no avail.

Any help would be appreciated.

Screen Shot 2020-09-01 at 10 41 29 PM

Screen Shot 2020-09-01 at 10 39 12 PM

@product-auto-label product-auto-label bot added the samples Issues that are directly related to samples. label Sep 2, 2020
@busunkim96
Copy link
Contributor

Hi @AhmedSamyMerah,

We're in the process of re-organizing the samples. An up-to-date version of this sample is in the python-translate repository. See https://github.com/googleapis/python-translate/blob/master/samples/snippets/translate_v3_translate_text.py

The v3 release of the google-cloud-translate library has some changes from the previous release. One of those is the removal of location_path.

CC @danoscarmike

danoscarmike added a commit that referenced this issue Sep 2, 2020
cloud-client only (not automl)
Fixes #4616
@yoshi-automation yoshi-automation added the triage me I really want to be triaged. label Sep 2, 2020
@engelke
Copy link
Contributor

engelke commented Sep 3, 2020

The issue has been addressed above. Please re-open it if you still feel there is a problem. Thanks!

@engelke engelke closed this as completed Sep 3, 2020
danoscarmike added a commit that referenced this issue Sep 11, 2020
cloud-client only (not automl)
Fixes #4616
@Hemanthkumar2112
Copy link

I used this

parent = client.common_location_path(project_id, location)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
samples Issues that are directly related to samples. triage me I really want to be triaged.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants