エラー メッセージ
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
という名前の環境変数に設定する必要があります。
さらに、GOOGLE_APPLICATION_CREDENTIALS
環境変数は、Document AI API を呼び出すコンテキスト内で使用可能でなければなりません。たとえば、ターミナル セッション内で変数を設定し、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
Forbidden: 403 POST API has not been used or is disabled
以下のメッセージが表示された場合:
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 を有効にします。数分待ってから、再試行します。
- 有効なサービス アカウント キー JSON ファイルが
GOOGLE_APPLICATION_CREDENTIALS
環境変数に格納されていることを確認します。このエラーを診断するには、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 バケット内にオブジェクトを作成する適切な権限がない可能性があります。クイックスタートで説明されているように、サービス アカウントに正しい権限が割り当てられていることを確認します。
Cloud Storage バケットの名前が間違っている可能性もあります。アクセスしようとしているバケットが存在することを確認します。
P4SA が Cloud Storage にアクセスできない
Document AI のプロダクトごとのサービス アカウント(P4SA)に、一部の Cloud Storage リソースにアクセスする権限がない。
message: Cloud DocumentAI P4SA doesn't have access to this Cloud Storage resource:
サービス アカウントが Cloud Storage にオブジェクトを作成できない
Document AI のプロダクトごとのサービス アカウント(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 バケットの名前が間違っている可能性もあります。アクセスしようとしているバケットが存在することを確認します。
呼び出し元が 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 バケット内のオブジェクトを取得するための適切な権限がない可能性があります。呼び出し元に適切な権限が割り当てられていることを確認してください。
Cloud Storage バケットの名前が間違っている可能性もあります。アクセスしようとしているバケットが存在することを確認します。
無効な引数
解決するには、エラー メッセージに記載されている手順をいくつか実施する必要があります。
サポートされていない API バージョン
例: オペレーションをサポートしていない API バージョンに対してリクエストが行われた場合。
message: "The requested operation is unsupported for the API version."
Bad Request
API リクエストが行われたものの、リクエスト フィールドに 1 つ以上の違反がある場合。各違反は、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://
にする必要があります。末尾はバックスラッシュ文字(/
)にする必要があります。バケット 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: "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" }
}
}
ドキュメントの MIME タイプが正しくない
ドキュメントの内容が指定された MIME タイプと一致しない場合。システムは、データセットのインポート時と予測呼び出し時にファイル形式(MIME タイプ)を検証します。指定したファイル形式が想定される形式と一致しない場合、次のようなエラー メッセージが表示されます。
message: "Incorrect document content for mime_type: foo"
details {
[type.googleapis.com/google.rpc.ErrorInfo] {
reason: "INCORRECT_DOCUMENT_MIME_TYPE"
domain: "documentai.googleapis.com"
metadata { key: "mime_type" value: "foo" }
}
}
ページなし
ページのないドキュメントが提出されたが、1 ページ以上必要である場合。
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"
}
}
ページ番号が重複している
ドキュメントに同じページ番号が 1 回以上表示されている場合。
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" }
}
}
事前トレーニング済みプロセッサ バージョンの状態の変更
事前トレーニング済みプロセッサ バージョンの状態を変更するリクエストが発行されたとき。このエラーは、事前トレーニング済みプロセッサ バージョンを削除しようとしたときに発生します。
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" }
}
}
データセットの検証
ページ アンカーがない、データが正しくない、ドキュメント プロトオブジェクトの一部の属性に詳細情報が不足しているなど、データセットが検証基準を満たしていない場合。
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"
}
}
無効なドキュメント タイプ
サポートされていないファイル形式または形式が正しくないドキュメント(.mp4.
など)が参照されている場合
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"
}
}
前提条件でのエラー
解決するには、エラー メッセージに記載されている手順をいくつか実施する必要があります。
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: "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: "The labeler pool already exists."
割り当てと上限
解決するには、エラー メッセージに記載されている手順をいくつか実施する必要があります。
割り当てを超過した
このメッセージが表示された場合の対処方法を示します。
RESOURCE_EXHAUSTED: Quota exceeded.
1 分あたりまたは 1 日あたりの割り当ての制限に達しました。Document AI の使用に関する割り当てと上限を確認してください。
割り当ての引き上げは、Google Cloud コンソールを使用してリクエストできます。
停止とレイテンシ
解決するには、エラー メッセージに記載されている手順をいくつか実施する必要があります。
タイムアウト
- オンライン処理の場合、リクエストに対してサーバー側で 2 分間のタイムアウトがあります。
- バッチ処理の場合、長時間実行オペレーションの生成にはサーバーサイドで 2 分間のタイムアウトがありますが、バッチジョブの完了にはタイムアウトはありません。
- 詳細については、長時間実行オペレーションのドキュメントをご覧ください。
オペレーションが指定されたタイムアウト内に完了しなかった。
長時間実行オペレーション(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.
オペレーションの完了にユーザーが設定したタイムアウト値が、処理中のドキュメントに対して短すぎる場合です。このエラーは、バッチ処理オペレーションが失敗したことを示していません。ユーザーが設定したタイムアウト値に関係なく、オペレーションは続行されます。