錯誤訊息
瞭解如何解決 Document AI 發生的一些錯誤。本主題討論的錯誤需要較多步驟才能解決,無法於錯誤訊息中描述。
如需錯誤處理的建議做法,請參閱 Cloud API 說明文件。
權限
如要解決這個問題,請按照錯誤訊息中的步驟操作。
無法使用應用程式預設憑證
如果您收到以下這則訊息:
The Application Default Credentials are not available. They are available if running in Compute Engine. Otherwise, the environment variable GOOGLE_APPLICATION_CREDENTIALS must be defined pointing to a file defining the credentials. See https://developers.google.com/accounts/docs/application-default-credentials for more information.
Document AI 使用應用程式預設憑證進行驗證。
您必須擁有專案的服務帳戶,並將服務帳戶的金鑰 (JSON 檔案) 下載到開發環境,然後將該 JSON 檔案的位置設定成名稱為 GOOGLE_APPLICATION_CREDENTIALS
的環境變數。
此外,您必須在呼叫 Document AI API 的環境中提供 GOOGLE_APPLICATION_CREDENTIALS
環境變數。舉例來說,如果您在終端機工作階段中設定變數,但在 IDE 的偵錯工具中執行程式碼,程式碼的執行環境可能無法存取該變數。在這種情況下,您對 Document AI 的要求可能會因缺乏正確驗證而失敗。
如要進一步瞭解如何設定 GOOGLE_APPLICATION_CREDENTIALS
環境變數,請參閱 Document AI 的快速入門導覽課程或使用應用程式預設憑證的說明文件。
權限遭拒
如果您收到以下這則訊息:
ERROR: (gcloud.auth.application-default.print-access-token) File (pointed by GOOGLE_APPLICATION_CREDENTIALS environment variable) does not exist! { "error": { "code": 403, "message": "The request is missing a valid API key.", "status": "PERMISSION_DENIED" } }
確認您存在 GOOGLE_APPLICATION_CREDENTIALS
環境變數中的位置具有有效的服務帳戶金鑰 JSON 檔案,且該變數指向正確的地方。
如要診斷此錯誤,請嘗試從您想呼叫 Document AI API 的資料夾開啟服務帳戶金鑰檔案。
cat $GOOGLE_APPLICATION_CREDENTIALS
禁止:403 POST API 未使用或已停用
如果收到以下訊息:
Forbidden: 403 POST Document AI API has not been used in project # before or it is disabled. Enable it by visiting [url], then retry. If you enabled this API recently, wait a few minutes for the action to propagate and retry.
- 前往錯誤訊息中指定的連結,然後啟用 Document AI API。請稍候幾分鐘,然後再試一次。
- 確認您存在
GOOGLE_APPLICATION_CREDENTIALS
環境變數中的位置具有有效的服務帳戶金鑰 JSON 檔案。如要診斷此錯誤,請嘗試從您想呼叫 Document AI API 的資料夾開啟服務帳戶金鑰檔案。cat $GOOGLE_APPLICATION_CREDENTIALS
寫入最終輸出內容時發生錯誤
如果收到批次處理要求結果時,看到類似以下的訊息:
{ "name": "projects/project-name/operations/operation-id", "metadata": { "@type": "type.googleapis.com/google.cloud.document.v1beta1.OperationMetadata", "state": "SUCCEEDED", "createTime": "2019-09-19T02:02:15.885267760Z", "updateTime": "2019-09-19T02:02:31.896425001Z" }, "done": true, "error": { "code": 5, "message": "Error writing final output to: gs://bucket-name/filename.json" } }
您的服務帳戶可能沒有在 Cloud Storage bucket 中建立物件的適當權限。請務必按照快速入門中的說明,為服務帳戶指派正確的權限。
您可能也拼錯了 Cloud Storage 值區的名稱。確認您嘗試存取的 bucket 是否存在。
P4SA 無法存取 Cloud Storage
當 Document AI Per-Product Service Account (P4SA) 無權存取部分 Cloud Storage 資源時。
message: "Cloud DocumentAI P4SA doesn't have access to this Cloud Storage resource:"
服務帳戶無法在 Cloud Storage 中建立物件
當 Document AI Per-Product Service Account (P4SA) 沒有在 Cloud Storage 中建立物件的權限時。
message: "Service account service-123@gcp-sa-prod-dai-core.iam.gserviceaccount.com
does not have permission storage.objects.create to create
Google Cloud Storage object in bucket gs://foo."
Document AI 服務帳戶可能沒有在 Cloud Storage 值區中建立物件的正確權限。請務必按照跨專案檔案存取設定中的說明,將正確的權限指派給 Document AI 服務帳戶。
您可能也拼錯了 Cloud Storage 值區的名稱。確認您嘗試存取的 bucket 是否存在。
呼叫端無法取得 Cloud Storage 中的物件
當 Document AI API 的呼叫者沒有權限可取得 Cloud Storage 中的物件時。
message: "The caller does not have permission storage.objects.get to get Google
Cloud Storage objects in bucket gs://foo."
API 呼叫端可能沒有適當權限,無法取得 Cloud Storage bucket 中的物件。請確認您已為呼叫者指派正確的權限。
您可能也拼錯了 Cloud Storage 值區的名稱。確認您嘗試存取的 bucket 是否存在。
無效引數
如要解決這個問題,請按照錯誤訊息中的步驟操作。
不支援的 API 版本
要求使用的 API 版本不支援該作業。
message: "The requested operation is unsupported for the API version."
不支援的處理器類型
向不支援指定處理器類型的 API 方法提出要求時。
message: "The requested operation is unsupported for the processor type: ${PROCESSOR_TYPE}."
要求無效
發出 API 要求,但要求欄位有一或多項違規事項。每項違規事項都會以 google.rpc.BadRequest
詳細資料中的 field_violations
形式記錄。
message: "Request contains an invalid argument."
details {
[type.googleapis.com/google.rpc.BadRequest] {
field_violations { field: "foo" description: "bar" }
}
}
無法批次處理所有文件
批次處理要求中的所有文件都無法處理。
message: "Failed to process all documents."
details {
[type.googleapis.com/google.rpc.ErrorInfo] {
reason: "FAILED_TO_PROCESS_ALL_DOCUMENTS"
domain: "documentai.googleapis.com"
}
}
找不到任何文件
需要或預期提供文件,但未提供任何文件,例如透過 Cloud Storage URI 匯入文件時。
message: "No valid documents found in ${training|test} directory. Ensure files are in a supported MIME type. For details, see https://cloud.google.com/document-ai/docs/file-types."
details {
[type.googleapis.com/google.rpc.ErrorInfo] {
reason: "NO_DOCUMENTS"
domain: "documentai.googleapis.com"
}
}
gcsUriPrefix
和 gcsOutputConfig.gcsUri
參數必須以 gs://
開頭,並以尾端反斜線字元 (/
) 結尾。請檢查 bucket URI 的設定。
範例:gs://bucket/directory/
不支援訓練
在不支援訓練的處理器類型上提出訓練處理器版本要求。
message: "Training is not supported on processor type: ${DOCUMENT_TYPE}_PROCESSOR."
未選取文件
需要文件,但資料集中未選取任何文件,例如建立資料標註工作時。
message: No documents selected. Please select at least one document."
details {
[type.googleapis.com/google.rpc.ErrorInfo] {
reason: "NO_DOCUMENTS_SELECTED"
domain: "documentai.googleapis.com"
}
}
找不到文件類型
文件類別 (例如執照、護照或月結單) 與處理器類型所需的分類不符。舉例來說,W2 剖析器中的分類器步驟找不到應付憑據中的元素。
這項設定也可能在 Google Cloud 控制台中顯示為 Couldn't preview the document: Unable to find a document of type: 'foo'
。
這則錯誤訊息適用於舊版處理器。
message: "Unable to find a document of type: 'foo'"
details {
[type.googleapis.com/google.rpc.ErrorInfo] {
reason: "DOCUMENT_OF_TYPE_NOT_FOUND"
domain: "documentai.googleapis.com"
}
}
文件大小超出上限
匯入資料集或執行預測時,文件檔案大小超出上限。
message: "Document size (2) exceeds limit: 1 (bytes)."
details {
[type.googleapis.com/google.rpc.ErrorInfo] {
reason: "DOCUMENT_SIZE_LIMIT_EXCEEDED"
domain: "documentai.googleapis.com"
metadata { key: "limit" value: "1" }
metadata { key: "size" value: "2" }
}
}
超過文件數量上限
超過文件數量上限時。
message: "Document count exceed the limit: 5 got 6"
details {
[type.googleapis.com/google.rpc.ErrorInfo] {
reason: "DOCUMENT_LIMIT_EXCEEDED"
domain: "documentai.googleapis.com"
metadata { key: "document_limit" value: "5" }
metadata { key: "documents" value: "6" }
}
}
不支援的 MIME 類型
提供不支援的 MIME 類型時。匯入資料集或進行預測呼叫時,系統會驗證檔案格式 (MIME 類型)。如要查看可用的檔案類型,請前往「支援的檔案」(以及「版面配置剖析器」)。如果系統不支援檔案格式,會顯示下列錯誤訊息:
message: "INVALID_ARGUMENT: Unsupported MIME type: 'foo'."
details {
[type.googleapis.com/google.rpc.ErrorInfo] {
reason: "UNSUPPORTED_MIME_TYPE"
domain: "documentai.googleapis.com"
metadata { key: "mime_type" value: "foo" }
}
}
沒有任何頁面
提供的文件沒有任何頁面,但必須包含一或多個頁面。
message: "No pages were found in the document."
details {
[type.googleapis.com/google.rpc.ErrorInfo] {
reason: "NO_PAGES"
domain: "documentai.googleapis.com"
}
}
負數頁碼
文件列出的頁碼為負值。
message: "Page number cannot be negative."
details {
[type.googleapis.com/google.rpc.ErrorInfo] {
reason: "NEGATIVE_PAGE_NUMBER"
domain: "documentai.googleapis.com"
}
}
重複的頁碼
文件列出相同頁碼一或多次。
message: "Duplicate page number detected (page numbers to indices): [{1, [1, 2]}, {4, [4, 5]}]."
details {
[type.googleapis.com/google.rpc.ErrorInfo] {
reason: "DUPLICATE_PAGE_NUMBERS"
domain: "documentai.googleapis.com"
metadata {
key: "page_number_to_indices"
value: "[{1, [1, 2]}, {4, [4, 5]}]"
}
}
}
超出頁數限制
超過文件總頁數上限。如果資料集中的文件頁數過多,超過處理器的限制,系統就會在匯入資料集或預測時顯示這則錯誤訊息。
message: "Document pages exceed the limit: 5 got 6"
details {
[type.googleapis.com/google.rpc.ErrorInfo] {
reason: "PAGE_LIMIT_EXCEEDED"
domain: "documentai.googleapis.com"
metadata { key: "page_limit" value: "5" }
metadata { key: "pages" value: "6" }
}
}
無圖片模式下超出頁面限制
如果資料集中的文件頁數過多,超過處理器的限制,您在匯入資料集或進行預測時就會遇到這項錯誤。您可以要求將專案加入許可清單,啟用無圖片模式,這樣頁面數量上限就會提高至 30。
message: "Document pages in non-imageless mode exceed the limit: 15 got 16. Try using imageless mode to increase the limit to 30."
details {
[type.googleapis.com/google.rpc.ErrorInfo] {
reason: "PAGE_LIMIT_EXCEEDED_IN_IMAGELESS_MODE"
domain: "documentai.googleapis.com"
metadata { key: "page_limit" value: "15" }
metadata { key: "pages" value: "16" }
metadata { key: "imageless_page_limit" value: "30" }
}
}
預先訓練的處理器版本狀態變更
發出變更預先訓練處理器版本狀態的要求時。 嘗試刪除預先訓練的處理器版本時,會發生這項錯誤。
message: "ProcessorVersion with id 'xyz' is pretrained by Google and cannot change states."
details {
[type.googleapis.com/google.rpc.ErrorInfo] {
reason: "PRETRAINED_PROCESSOR_VERSION_STATE_CHANGE"
domain: "documentai.googleapis.com"
metadata { key: "processor_id" value: "abc" }
metadata { key: "target_state" value: "DELETING" }
metadata { key: "version_id" value: "xyz" }
}
}
資料集驗證
如果資料集未通過驗證條件,例如缺少網頁錨點、資料有誤,或是文件 Proto 物件的部分屬性缺少詳細資料。
message: "Invalid dataset. See operation metadata for specific errors."
details {
[type.googleapis.com/google.rpc.ErrorInfo] {
reason: "INVALID_DATASET"
domain: "documentai.googleapis.com"
}
}
人機迴圈非內嵌文件審查
當系統對未內嵌定義的文件啟動人工審查時。
message: "The document for review must be provided inline."
details {
[type.googleapis.com/google.rpc.ErrorInfo] {
reason: "HUMAN_REVIEW_NON_INLINED_DOCUMENT"
domain: "documentai.googleapis.com"
}
}
無效的文件類型
文件類型無效或處理器不支援。文件類型是指文件的類別,例如W2),而非檔案格式或 MIME 類型,例如 PDF 或 JPEG。
message: "Invalid document type: 'foo'."
details {
[type.googleapis.com/google.rpc.ErrorInfo] {
reason: "INVALID_DOCUMENT_TYPE"
domain: "documentai.googleapis.com"
metadata { key: "type" value: "foo" }
}
}
文件範圍超出界限
message: "Text span [1, 5) is out of bounds: [1, 3)."
details {
[type.googleapis.com/google.rpc.ErrorInfo] {
reason: "DOCUMENT_SPAN_OUT_OF_BOUNDS"
domain: "documentai.googleapis.com"
metadata { key: "bounds" value: "[1, 3)" }
metadata { key: "span" value: "[1, 5)" }
metadata { key: "type" value: "Text" }
}
}
文件範圍無效
提供無效的文件範圍,例如開始時間晚於結束時間。
message: "Character span is invalid. Ensure the max is greater than the min."
details {
[type.googleapis.com/google.rpc.ErrorInfo] {
reason: "DOCUMENT_SPAN_INVALID"
domain: "documentai.googleapis.com"
metadata { key: "span" value: "Character" }
}
}
UTF-8 文件無效
提供包含無效 UTF-8 的文件時。
message: "Document contains invalid UTF-8 text."
details {
[type.googleapis.com/google.rpc.ErrorInfo] {
reason: "DOCUMENT_INVALID_UTF_8"
domain: "documentai.googleapis.com"
metadata { key: "bytes" value: "[2, 3)" }
}
}
資料集結構定義無效
message: "The processor has an empty or invalid schema: "
details {
[type.googleapis.com/google.rpc.ErrorInfo] {
reason: "INVALID_SCHEMA_ERROR"
domain: "documentai.googleapis.com"
}
}
不支援 OcrConfig
為不支援 OcrConfig 的處理器發出處理要求時。
message: "OcrConfig is not supported for processor type: 'foo'."
details {
[type.googleapis.com/google.rpc.ErrorInfo] {
reason: "OCR_CONFIG_UNSUPPORTED"
domain: "documentai.googleapis.com"
}
}
匯入設定無效
匯入設定無效時。
message: "The import config is invalid: foo"
details {
[type.googleapis.com/google.rpc.ErrorInfo] {
reason: "INVALID_IMPORT_CONFIG"
domain: "documentai.googleapis.com"
}
}
來源處理器版本無效
嘗試匯入處理器版本時,來源處理器版本無效,無法匯入。
message: "The source processor version is invalid in import processor version."
details {
[type.googleapis.com/google.rpc.ErrorInfo] {
reason: "INVALID_SOURCE_PROCESSOR_VERSION_ERROR"
domain: "documentai.googleapis.com"
}
}
區塊大小無效
區塊大小設定無效。
message: "Invalid chunk size. Requested chunk size (${CHUNK_SIZE}) must be in the range of [${MIN_CHUNK_SIZE}, ${MAX_CHUNK_SIZE}]."
details {
[type.googleapis.com/google.rpc.ErrorInfo] {
reason: "INVALID_ARGUMENT"
domain: "documentai.googleapis.com"
}
}
不符合先決條件
如要解決這個問題,請按照錯誤訊息中的步驟操作。
KMS 金鑰無效
提供的金鑰無效 (例如已停用)。
message: "KMS key 'projects/1/keys/abc' is invalid (KEY_DISABLED)."
details {
[type.googleapis.com/google.rpc.ErrorInfo] {
reason: "KMS_KEY_INVALID"
domain: "documentai.googleapis.com"
metadata { key: "details" value: "KEY_DISABLED" }
metadata { key: "kms_key_name" value: "projects/1/keys/abc" }
}
}
處理器狀態變更
發出無效的處理器狀態變更要求時。
message: "Processor state cannot be changed to 'DISABLED' since it is 'DISABLED'."
details {
[type.googleapis.com/google.rpc.ErrorInfo] {
reason: "PROCESSOR_STATE_CHANGE_INVALID"
domain: "documentai.googleapis.com"
metadata { key: "current_state" value: "DISABLED" }
metadata { key: "processor_id" value: "xyz" }
metadata { key: "target_state" value: "DISABLED" }
}
}
處理器版本狀態變更
發出無效要求,變更處理器版本的狀態。
message: "ProcessorVersion state cannot be changed to 'DEPLOYING' since it is 'DEPLOYED'."
details {
[type.googleapis.com/google.rpc.ErrorInfo] {
reason: "PROCESSOR_VERSION_STATE_CHANGE_INVALID"
domain: "documentai.googleapis.com"
metadata { key: "current_state" value: "DEPLOYED" }
metadata { key: "processor_id" value: "abc" }
metadata { key: "target_state" value: "DEPLOYING" }
metadata { key: "version_id" value: "xyz" }
}
}
處理器未啟用
發出依附於特定處理器的要求,但該處理器未啟用。
message: "Processor 'xyz' is not enabled."
details {
[type.googleapis.com/google.rpc.ErrorInfo] {
reason: "PROCESSOR_NOT_ENABLED"
domain: "documentai.googleapis.com"
metadata { key: "processor_id" value: "xyz" }
metadata { key: "state" value: "DISABLED" }
}
}
處理器版本未部署
發出依附於特定處理器版本的部署要求,但處理器未部署。
message: "ProcessorVersion 'abc' is not deployed."
details {
[type.googleapis.com/google.rpc.ErrorInfo] {
reason: "PROCESSOR_VERSION_NOT_DEPLOYED"
domain: "documentai.googleapis.com"
metadata { key: "processor_id" value: "xyz" }
metadata { key: "state" value: "TRAINING" }
metadata { key: "version_id" value: "abc" }
}
}
處理器預設版本
發出依附於已設定預設版本的請求,但未設定預設版本。
message: "Processor 'xyz' does not have a default version configured."
details {
[type.googleapis.com/google.rpc.ErrorInfo] {
reason: "PROCESSOR_DEFAULT_VERSION_UNSET"
domain: "documentai.googleapis.com"
metadata { key: "processor_id" value: "xyz" }
}
}
處理器移除預設版本
發出取消部署或刪除處理器版本的請求,但該版本已設為預設版本。
message: "ProcessorVersion 'xyz' cannot be undeployed or deleted as it is the default version."
details {
[type.googleapis.com/google.rpc.ErrorInfo] {
reason: "PROCESSOR_REMOVE_DEFAULT_VERSION"
domain: "documentai.googleapis.com"
metadata { key: "processor_id" value: "abc" }
metadata { key: "version_id" value: "xyz" }
}
}
資料集未初始化
發出需要初始化資料集的要求,但資料集未初始化。
message: "Dataset is not initialized."
details {
[type.googleapis.com/google.rpc.ErrorInfo] {
reason: "DATASET_NOT_INITIALIZED"
domain: "documentai.googleapis.com"
}
}
資料集已初始化或正在初始化
發出需要取消初始化資料集的要求,但資料集已初始化或正在初始化。
message: "Dataset is already initialized or is initializing."
details {
[type.googleapis.com/google.rpc.ErrorInfo] {
reason: "DATASET_INITIALIZED_OR_INITIALIZING"
domain: "documentai.googleapis.com"
}
}
資料集位置不得為空白錯誤
要求需要空白的資料集儲存位置,但資料夾含有物件。
message: "Given dataset location is not empty. Please select an empty folder."
details {
[type.googleapis.com/google.rpc.ErrorInfo] {
reason: "DATASET_LOCATION_NOT_EMPTY"
domain: "documentai.googleapis.com"
}
}
有封鎖作業錯誤
有其他作業正在執行,導致必要作業遭到封鎖。
message: "The operation cannot be performed due to an ongoing 'EXAMPLE_OPERATION_TYPE' blocking operation. Try again after the operation finishes."
details {
[type.googleapis.com/google.rpc.ErrorInfo] {
reason: "HAS_BLOCKING_OPERATION_ERROR"
domain: "documentai.googleapis.com"
}
}
不支援的頁面範圍錯誤
部分作業不支援 page_range
欄位,例如批次處理。
message: "Page range is not supported."
details {
[type.googleapis.com/google.rpc.ErrorInfo] {
reason: "PAGE_RANGE_UNSUPPORTED"
domain: "documentai.googleapis.com"
}
}
Cloud Storage 資料夾包含資料集錯誤
Cloud Storage 資料夾已包含資料集。
message: "The folder 'folder_uri' already has dataset 'dataset-id' under it."
details {
[type.googleapis.com/google.rpc.ErrorInfo] {
reason: "GCS_FOLDER_CONTAINS_DATASET_ERROR"
domain: "documentai.googleapis.com"
}
}
缺少縮圖錯誤
無法擷取資料集文件縮圖時。
message: "Failed to get dataset document thumbnail, consider running re-sync on the dataset."
details {
[type.googleapis.com/google.rpc.ErrorInfo] {
reason: "THUMBNAIL_MISSING"
domain: "documentai.googleapis.com"
}
}
已超過資料集頁面數量上限
資料集的總頁數超過上限。
message: "Dataset page count exceeds the limit of 5. Got 6."
details {
[type.googleapis.com/google.rpc.ErrorInfo] {
reason: "DATASET_PAGE_LIMIT_EXCEEDED"
domain: "documentai.googleapis.com"
}
}
同步處理不支援的處理器
要求使用不再支援同步處理的處理器版本。
message: "Processor ${PROCESSOR_ID} version ${VERSION_ID} of type ${TYPE_NAME} is no longer supported for sync processing. Please upgrade to a newer version: https://cloud.google.com/document-ai/docs/manage-processor-versions."
details {
[type.googleapis.com/google.rpc.ErrorInfo] {
reason: "UNSUPPORTED_PROCESSOR"
domain: "documentai.googleapis.com"
}
}
找不到
如要解決這個問題,請按照錯誤訊息中的步驟操作。
找不到評估結果
找不到處理器版本的評估結果。
message: "Evaluation with ID 'qrs' not found."
details {
[type.googleapis.com/google.rpc.ErrorInfo] {
reason: "EVALUATION_NOT_FOUND"
domain: "documentai.googleapis.com"
metadata { key: "evaluation_id" value: "qrs" }
metadata { key: "processor_id" value: "xyz" }
metadata { key: "version_id" value: "abc" }
}
}
找不到文件
找不到作業所需的文件。
message: "Document not found: 'gs://foo'."
details {
[type.googleapis.com/google.rpc.ErrorInfo] {
reason: "DOCUMENT_NOT_FOUND"
domain: "documentai.googleapis.com"
metadata { key: "document" value: "gs://foo" }
}
}
找不到處理器
找不到作業所需的處理器。
message: "Processor with id 'xyz' not found."
details {
[type.googleapis.com/google.rpc.ErrorInfo] {
reason: "PROCESSOR_NOT_FOUND"
domain: "documentai.googleapis.com"
metadata { key: "processor_id" value: "xyz" }
}
}
找不到處理器版本
找不到作業所需的處理器版本。
message: "ProcessorVersion with id 'abc' not found."
details {
[type.googleapis.com/google.rpc.ErrorInfo] {
reason: "PROCESSOR_VERSION_NOT_FOUND"
domain: "documentai.googleapis.com"
metadata { key: "processor_id" value: "xyz" }
metadata { key: "version_id" value: "abc" }
}
}
找不到資料標籤工作
找不到資料標籤工作時。
message: "Data labeling job with id 'EXAMPLE_DATA_LABELING_JOB' not found in processor EXAMPLE_PROCESSOR."
找不到結構定義版本
找不到結構定義版本時。
message: "Schema version with id 'EXAMPLE_SCHEMA_VERSION' not found."
找不到結構定義
找不到結構定義時。
message: "Schema with id 'EXAMPLE_SCHEMA' not found."
已存在
如要解決這個問題,請按照錯誤訊息中的步驟操作。
人機迴圈標籤器已存在
建立已存在的標籤人員集區。
message: "The labeler pool already exists."
已有名稱相同的架構版本
建立結構定義版本時,使用已有的顯示名稱。
message: "A schema version with the name 'EXAMPLE_SCHEMA_VERSION' already exists."
結構定義顯示名稱已存在
建立結構定義時,使用已有的顯示名稱。
message: "A schema with the name 'EXAMPLE_SCHEMA' already exists."
配額與限制
如要解決這個問題,請按照錯誤訊息中的步驟操作。
超過配額
如果您收到以下這則訊息:
RESOURCE_EXHAUSTED: Quota exceeded.
您已達到每分鐘或每日配額的上限。請查看使用 Document AI 的配額與限制。
您可以透過Google Cloud 控制台要求增加配額。
服務中斷與延遲
如要解決這個問題,請按照錯誤訊息中的步驟操作。
逾時
作業未在指定逾時時間內完成。
輪詢長時間執行的作業 (LRO) 時,如果收到下列 (或類似) 錯誤訊息:
google.api_core.future.polling._OperationNotComplete
...
google.api_core.exceptions.RetryError: Deadline of 0.0s exceeded while calling target function, last exception:
...
concurrent.futures._base.TimeoutError: Operation did not complete within the designated timeout.
使用者為完成作業設定的逾時值過低,無法處理文件。這個錯誤不代表批次程序作業失敗,無論使用者設定的逾時值為何,作業都會繼續執行。
安全性篩選器錯誤
由於要求或回覆遭到大型語言模型 (LLM) 安全性篩選器封鎖,因此發生內部伺服器端錯誤。這個錯誤無法重試。
message: "Safety filter error."
發生內部錯誤
發生內部伺服器端錯誤,重試連線。
message: "Internal error encountered."