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

document ai

i am getting an error "Failed to import all documents" when trying to import documents to train a processor. The document are in google cloud bucket , i am able to select the folder but getting this error when trying to import.

anirud_0-1737646550109.png

 

1 2 265
2 REPLIES 2

Hi @anirud,

Welcome to Google Cloud Community!

It looks like you are trying to import your documents in document AI to train it in a processor, but encountering an error message “Failed to import all documents” even though your documents are in the Google Cloud Bucket.

Here are the potential ways that might help with your use case:

  • Document Format issues: Make sure that all document files in your Google cloud bucket are supported by Document AI. 
  • Access control problems: Double check if your Document AI service account has the required permission to read your documents in your Google Cloud Storage bucket. Document AI service account has Storage object Viewer role or more permissive if needed.
  • File size/Quantity limitsDocument AI has limits on the maximum size of documents. If your documents are very large, you may try to break them up or compress them.
  • Auto-labeling Issues: You’ve mentioned that you are using auto-labeling features. Make sure that you are using the correct version that is compatible with the file format you are using.

If you continue to run into issues, consider reaching out to Google Cloud Support to further check underlying issues. When you contact them, be sure to provide as much detail as possible and include screenshots. This will help them understand your problem better and get it sorted out more quickly.

Was this helpful? If so, please accept this answer as “Solution”. If you need additional assistance, reply here within 2 business days and I’ll be happy to help.

 

I'm running into the same issue. When I inspect the network tab, I see:

`code: 7, message: "Does not have permissions [storage.objects.get] in the bucket <bucket>"`

but I have given the document ai service account (*@gcp-sa-prod-dai-core.iam.gserviceaccount.com) the correct permissions on the bucket.

How to fix?