エラー メッセージ

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.
  1. エラー メッセージで指定されたリンクにアクセスし、Document AI API を有効にします。数分待ってから、再試行します。
  2. 有効なサービス アカウント キー 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 バケットの名前のスペルが間違っている可能性もあります。アクセスしようとしているバケットが存在することを確認します。

Cloud Storage にアクセスできない P4SA

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."

サポートされていないプロセッサ タイプ

指定されたプロセッサタイプをサポートしていない API メソッドにリクエストが送信された場合。

message: "The requested operation is unsupported for the processor type: ${PROCESSOR_TYPE}."

不正なリクエスト

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 タイプ)を検証します。サポートされているファイル(および Layout Parser)に移動して、使用可能なファイル形式を確認します。ファイル形式がサポートされていない場合は、次のエラー メッセージが表示されます。

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" }
  }
}

ページなし

ページのない書類が提出されたが、1 ページ以上が必要な場合。

message: "No pages were found in the document."
details {
  [type.googleapis.com/google.rpc.ErrorInfo] {
    reason: "NO_PAGES"
    domain: "documentai.googleapis.com"
  }
}

負のページ番号

ドキュメントのページ番号の 1 つに負の値がリストされている場合。

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" }
  }
}

画像なしモードでページの上限を超えました

このエラーは、データセット内のドキュメントのページ数が多すぎて、プロセッサの制限を超えている場合に、データセットのインポートまたは予測中に発生します。プロジェクトを許可リストに追加して画像なしモードを有効にすると、ページの上限が 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"
  }
}

無効なドキュメント タイプ

ドキュメント タイプが無効であるか、プロセッサでサポートされていない場合。ドキュメント タイプは、ドキュメントのカテゴリ(ファイル形式や MIME タイプ(PDF や JPEG など)ではなく、W2)である必要があります。

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 Unsupported

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" }
  }
}

Data Labeling Job Not Found

データラベル付けジョブが見つからない場合。

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.

1 分あたりまたは 1 日あたりの割り当ての制限に達しました。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."