Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

[Translation API] Permissions Denied when creating a new glossary

Hi.

Since Today we are getting `_GoogleError: Error: PERMISSION_DENIED. Job state: FAILED.` when trying to create a glossary. We are doing this with a service account that has the following permissions.

Screenshot 2024-07-16 at 21.21.00.png

As I can see in production logs, the last time it worked was the 12th of July. I can't see any changes on our side and other operations seem to work just fine.

Any ideas? Does anyone else see the same problem?

Technicals:

- we are using the latest version of the `@google-cloud/translate` node library, v8.3.0. We didn't change this version since at least 3 weeks.

[EDIT ]- Adding the `Owner` permissions gives the same errror.

[EDIT ]- It works when using `v3beta1` but that shouln't be our solution

 

4 5 716
5 REPLIES 5

I have the same problem. Could this be related to the migration to new VertexAI API?

Hello,

I just started using the google translate api yesterday. I was able to train a custom model but am having the same error as mentioned in this post. I have cloudtranlate api and storage ecs admin access on both the IAM user and service account. So I don't see an issue with the permissions? 

- Ahmed

 

Hello.

I also recently encountered the same issue. I was handling the process through a Python script, and I managed to resolve the issue by changing the import in the Google Cloud Translate API library from:

python
from google.cloud import translate_v3 as translate

to:

python
from google.cloud import translate_v3beta1 as translate

I hope this solution helps you as well.

I am currently following the instructions on this page: https://cloud.google.com/translate/docs/advanced/glossary 

I have also followed the instructions on this page: https://groups.google.com/g/google-translate-api/c/JLkWkxkIGWU 

I have tried: 

from google.cloud import translate_v3beta1 as translate

All I get is: "google.api_core.exceptions.PermissionDenied: 403 Cloud IAM permission 'cloudtranslate.glossaries.create' denied."

Yes I have Storage Object Admin and Cloud Translate API Admin assigned to my service agent. I can access translation services ok, but not glossary creation, so I am authenticating ok.

Does anyone know of any reason why this won't work?  Or any alternative way to create a glossary?

My glossary URI is 

"gs://kaffelogic-studio/Glossary-Kaffelogic-Studio.csv"

and my glossary ID is 

'glossary-5866'

 Any help would be much appreciated as I am very keen to use glossaries.