Comments (11)
Solved, I had the wrong JSON file!
from imagetotext.
Try this https://docs.gspread.org/en/latest/oauth2.html#for-bots-using-service-account
from imagetotext.
How can we do when we have the json file but not under this format?
I have this file but no "private_key_id" nor 'private_key" nor "client_email" and I have "client_secret" instead of "client_x509_cert_url".
from imagetotext.
@HeleneRousseau
Clicking the three dots on the action column, then selecting Manage Keys>Add key>Create New key will do the trick.
from imagetotext.
@masoudl Ensure you're following the Authentication steps to get your service account JSON credentials: https://github.com/Carleslc/ImageToText#authentication
It has this format:
{
"type": "service_account",
"project_id": "imagetotext-***",
"private_key_id": "***",
"private_key": "-----BEGIN PRIVATE KEY-----
\n***\n-----END PRIVATE KEY-----\n",
"client_email": "imagetotext@imagetotext-***.iam.gserviceaccount.com",
"client_id": "***",
"auth_uri": "https://accounts.google.com/o/oauth2/auth",
"token_uri": "https://oauth2.googleapis.com/token",
"auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs",
"client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/imagetotext%40imagetotext-***.iam.gserviceaccount.com"
}
from imagetotext.
Hi, can you give more detail on how you fixed it?
I am having the same problem.
from imagetotext.
Do you have the JSON file?
from imagetotext.
@masoudl Ensure you're following the Authentication steps to get your service account JSON credentials: https://github.com/Carleslc/ImageToText#authentication
It has this format:
{ "type": "service_account", "project_id": "imagetotext-***", "private_key_id": "***", "private_key": "-----BEGIN PRIVATE KEY----- \n***\n-----END PRIVATE KEY-----\n", "client_email": "imagetotext@imagetotext-***.iam.gserviceaccount.com", "client_id": "***", "auth_uri": "https://accounts.google.com/o/oauth2/auth", "token_uri": "https://oauth2.googleapis.com/token", "auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs", "client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/imagetotext%40imagetotext-***.iam.gserviceaccount.com" }
:
Do you know where can I get this json?
from imagetotext.
How can we do when we have the json file but not under this format?
I have this file but no "private_key_id" nor 'private_key" nor "client_email" and I have "client_secret" instead of "client_x509_cert_url".
@HeleneRousseau Where and how have you got the file? Have you tried the convert.py
script using your service account file? Does it give any error with the format?
from imagetotext.
I get this file from the google cloud platform. I don't have any service account credential. I just have an OAuth Client (which now has been deleted according to the error message but that's another problem) and an API key. Ideally I would like to work only with an API key.
from imagetotext.
For OAuth 2.0 Client IDs use credentials.json as the file name. I used service_accounts.json for the OAuth 2.0 file name and was getting "MalformedError: Service account info was not in the expected format, missing fields client_email, token_uri." until I discovered it. For service account bots use service_account.json
from imagetotext.
Related Issues (1)
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 imagetotext.