Comments (2)
Hi @nshganesh,
I'm not sure where the first screenshot comes from, but it's not on the https://cloud.google.com/document-ai/docs/process-documents-client-libraries page. The use of JSON and base64 is specific to an older endpoint for documentai, and does not apply to the code in https://cloud.google.com/document-ai/docs/process-documents-client-libraries. (If the documentation on https://cloud.google.com/document-ai/docs/process-documents-client-libraries links directly to that screenshot somewhere and implies that it is related, then that's misleading and it should be corrected; if you could point us to where that link is, that would help, because I wasn't able to locate it.)
If you're using the client libraries in https://cloud.google.com/document-ai/docs/process-documents-client-libraries then you should not be doing any base64 encoding. The error you're getting without base64 encoding suggests to me that the request actually did succeed. The error is actually happening when trying to pretty-print the response. It looks like there's a field somewhere in the response message that is a binary string but is being incorrectly marked as utf-8, which if true might indicate a bug in the protobuf library. As a workaround, I suggest, instead of printing or inspecting the response, just get the fields you're interested in.
from google-cloud-ruby.
HI @dazuma
Thank you so much for taking time to go through my issue. I actually went ahead with a nodejs client library. It works perfectly with base64 encoding and according to the documentation.
Sharing little more details about the problem however when I used ruby.
The screenshot I have shared is part of an authenticated page where we can create custom processors. Something like this https://console.cloud.google.com/ai/document-ai/locations/us/processors/[processorid].
I am not inspecting or printing from my part as such, even though the error message somehow suggests that. I also believe that there is some bug in the protobuf library just as you pointed it out.
from google-cloud-ruby.
Related Issues (20)
- [Nightly CI Failures] Failures detected for google-cloud-bigtable HOT 8
- [Nightly CI Failures] Failures detected for google-cloud-bigquery HOT 1
- [Nightly CI Failures] Failures detected for google-cloud-recaptcha_enterprise-v1beta1 HOT 2
- [Nightly CI Failures] Failures detected for google-cloud-recaptcha_enterprise HOT 2
- [Nightly CI Failures] Failures detected for google-cloud-recaptcha_enterprise-v1 HOT 3
- [Nightly CI Failures] Failures detected for google-cloud-recommendation_engine-v1beta1 HOT 3
- [Nightly CI Failures] Failures detected for google-cloud-recommendation_engine HOT 3
- Unable to run text_detection with image arguments HOT 3
- Warning: a recent release failed
- Warning: a recent release failed HOT 1
- Warning: a recent release failed
- Ruby 3.3 NoMethodError: undefined method `is_a?' for an instance of Google::Cloud::Config HOT 1
- Error reporting works from middleware, but nowhere else
- Warning: a recent release failed
- Warning: a recent release failed
- Warning: a recent release failed
- Google::Cloud::InvalidArgumentError: An error has occurred when making a REST request: Invalid JSON payload received. Unknown name "imagelessMode": Cannot find field.
- trace explorer: Add support for stacktraces that appear in the "Stacktraces" tab in trace explorer HOT 1
- [Nightly CI Failures] Failures detected for google-cloud-managed_kafka HOT 4
- [Nightly CI Failures] Failures detected for google-cloud-managed_kafka-v1 HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from google-cloud-ruby.