google-api

Google Drive API How can I find the path of a file?

Google Drive API How can I find the path of a file? Question: I’m trying to find the path of a file when fetching a file list with the Google Drive API. Right now, I’m able to fetch file properties (currently only fetching checksum, id, name, and mimeType): results = globalShares.service.files().list(pageSize=1000,corpora=’user’,fields=’nextPageToken, files(md5Checksum, id, name, mimeType)’).execute() …

Total answers: 1

Reading Sheet2 via Google Sheets API & Python

Reading Sheet2 via Google Sheets API & Python Question: I just wanna read the next tab/sheet via the API in my Google Sheets Project with Python (Windows 10) Everything works for sheet1, I just want to read/edit sheet2 (and others that I will create in the project). Tab example: https://i.imgur.com/260rI7K.jpg import gspread from oauth2client.service_account import …

Total answers: 2

ValueError: Client secrets must be for a web or installed app

ValueError: Client secrets must be for a web or installed app Question: I am running the quickstart.py example code under Python Quickstart and I am getting the following error: ValueError: Client secrets must be for a web or installed app. I created a credentials.json file with project owner rights. The error occurs in the following …

Total answers: 2

Requested 10 dimensions; only 9 are allowed on Google Analytics Core Reporting API4

Requested 10 dimensions; only 9 are allowed on Google Analytics Core Reporting API4 Question: I have been trying to call Google Analytics core reporting v4 to get basic traffic data, but I could never get default channel grouping/channel grouping from the API. However, the dimension is available according to their metric and dimension explorer. from …

Total answers: 1

Python, speech_recognition tool does not recognize .wav file

Python, speech_recognition tool does not recognize .wav file Question: I have generated a .wav audio file containing some speech with some other interference speech in the background. This code worked for me for a test .wav file: import speech_recognition as sr r = sr.Recognizer() with sr.WavFile(wav_path) as source: audio = r.record(source) text = r.recognize_google(audio) If …

Total answers: 3

Using Google API for Python- where do I get the client_secrets.json file from?

Using Google API for Python- where do I get the client_secrets.json file from? Question: I am looking into using the Google API to allow users to create/ edit calendar entries in a company calendar (Google calendar) from within iCal. I’m following the instructions at: https://developers.google.com/api-client-library/python/auth/web-app Step 2 says that I will need the application’s client …

Total answers: 2

Automating pydrive verification process

Automating pydrive verification process Question: I am trying to automate the GoogleAuth process when using the pydrive library (https://pypi.python.org/pypi/PyDrive). I’ve set up the pydrive and the google API such that my secret_client.json works but it requires web authentication for gdrive access every time i run my script: from pydrive.auth import GoogleAuth from pydrive.drive import GoogleDrive …

Total answers: 5

HTTPError 403 (Forbidden) with Django and python-social-auth connecting to Google with OAuth2

HTTPError 403 (Forbidden) with Django and python-social-auth connecting to Google with OAuth2 Question: Using python-social-auth, I get a 403: Forbiden error message after accepting access from google EDIT: I’ve recently (2017) had the same error but under a new message: 401 Client Error: Unauthorized for url: https://accounts.google.com/o/oauth2/token Asked By: damio || Source Answers: This answer …

Total answers: 3

How to Manage Google API Errors in Python

How to Manage Google API Errors in Python Question: I’m currently doing a lot of stuff with BigQuery, and am using a lot of try… except…. It looks like just about every error I get back from BigQuery is a apiclient.errors.HttpError, but with different strings attached to them, i.e.: <HttpError 409 when requesting https://www.googleapis.com/bigquery/v2/projects/some_id/datasets/some_dataset/tables?alt=json returned …

Total answers: 2

How to embed Google Speech to Text API in Python program?

How to embed Google Speech to Text API in Python program? Question: I have a project in which I have created a chat program between a client and host, and I have to embed Speech to Text in it. Is there any way by which I can embed Google Speech to Text API in my …

Total answers: 4