I am trying to use the Google DocAI Warehouse sample Python code and it looks like that the location parameter is always ignored and just assumes the 'us' location.
My prototype project has 'eu' as location and the sample code simply fails:
google.api_core.exceptions.InvalidArgument: 400 The resource projects/{my-proj-id}/locations/eu is not located in us
This issue is highlighted here https://github.com/GoogleCloudPlatform/document-ai-samples/issues/676 and https://www.googlecloudcommunity.com/gc/AI-ML/Document-AI-Warehouse-API-Sample-Python-Code-location-eu-Issue/td-p/677608 but no responses.
Just wondering if anyone on here can help?
The Python and Node.js samples don't include the endpoint override required for non-US instances.
This can be done with
ClientOptions
similar to this sample for Document AI.Here's what it should look like for Document AI Warehouse in Python.
I have these Pull Requests open to update the code samples: