Closed nittonfemton closed 3 months ago
Actually no, cross platform does not seem to be the problem. gs://xxx/7mOLZo4BPUtxfx7Yx6gD-48190d5322acc68181b84fec05194c4a.pdf
Does not work, but gs://xxx/1.pdf works. So can hopefully resolve this with some encoding.
@nittonfemton Are there additional details in the error? There might be an "error detail" or "error info" field.
Well, I've picked up on this and tried some more.
Filename & length is not related to this at all, I think. Batch processing worked fine with the original filenames, but only on the own project bucket.
Processing a single document with client.process_document() works fine (to my surprise) on the cross-project bucket. Batch processing on the same single document did not work, however, when the document was on the cross-project bucket.
The code I use for error reporting is this:
operation = doc_client.batch_process_documents(request)
try:
print(operation.result(timeout=60))
except Exception as e:
print (e.message)
print (e.code)
Results in: Failed to process all documents. 400
Thank you for taking the time.
Feeling just a little bit stupid now that I asked you about filenames and whatnot. Of course it was a permission issue.
For anyone else stumbling into this, check your first bucket for the principal which have the "DocumentAI Core Service Agent" role. Copy the principal and add it with the same role to the cross-platform bucket.
I have all my processors in one project and need to run them on documents on a bucket within another project. I have given "storage admin" to the service role, and verified access by downloading files from script with my DocumentAI service role.
However then running batch_process_documents() on these files it always return error: Error: 400 Failed to process all documents. 3: Failed to process all documents.
Any help appreciated.