You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

创建Google Cloud在线术语表时遇“Empty resource name”错误求助

Fixing "Empty resource name.; Resource type: glossary" Error When Creating Cloud Translate Glossary

Hey there, let's break down this error and get your glossary created successfully!

What's Causing the Error?

The 400 INVALID_ARGUMENT error clearly states that your request is missing a required piece of information: the unique identifier for your glossary. When creating a Cloud Translate glossary, the API needs to know what to name your resource—without this, it can't create or identify the glossary you're trying to build.

Fixing the Request JSON

Your current request.json only includes language settings and the GCS input path, but it's missing the glossaryId field (this is the unique name you want to give your glossary). Add this field to your JSON, like so:

{
  "glossaryId": "multi-language-terms-glossary",
  "languageCodesSet": {
    "languageCodes": ["en", "en-GB", "ru", "fr", "pt-BR", "pt-PT", "es"]
  },
  "inputConfig": {
    "gcsSource": {
      "inputUri": "gs://focused-pipe-251317-vcm/testgc.csv"
    }
  }
}

Replace multi-language-terms-glossary with a name that makes sense for your use case—just make sure it's unique within your project and location.

Additional Checks to Ensure Success

Once you've added the glossaryId, double-check these details to avoid other potential issues:

  • CSV File Format: For a multi-language glossary, your CSV must have language codes as the first row (matching the codes in your languageCodes list), with each subsequent row containing the corresponding terms for each language.
  • API Request Endpoint: Make sure your rungcglossary script is sending the request to the correct endpoint, which includes your project ID and a valid location (e.g., us-central1). The full endpoint should look like:
    https://translation.googleapis.com/v3/projects/focused-pipe-251317/locations/us-central1/glossaries
    
  • GCS Permissions: Verify that the service account running the script has storage.objects.get permissions for the GCS bucket holding your CSV—this ensures the API can access the file to build the glossary.

内容的提问来源于stack exchange,提问作者madan kandula

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.14 07:11:06