Use this tag if you are going to refer something from Python libraries OR API Clients of Google Cloud Platform.
Questions tagged [google-cloud-python]
207 questions
0
votes
1 answer
ImportError: cannot import name preprocessor_pb2
I have skimmed through the internet for a couple of days but found no working solution for this problem. I'm training an image dataset using the Tensorflow Object Detection API on the GCloud. My job keeps failing, citing this error. I have the…

Jai Kotia
- 166
- 2
- 16
0
votes
1 answer
list_jobs function min_creation_time error
Below is my code in Django frame (python 2.7) to list the jobs in Bigquery. I want to filter to just the ones in last two weeks but the min_creation_time in the list_jobs() function does not work and errors out for some reason. Please suggest
from…

Will_smith12
- 51
- 6
0
votes
1 answer
Uploading a Blob using HTTP conditional headers
I'm using Google Cloud Python API to upload blobs into buckets, which is working just fine.
However, for my specific use case, I need to prevent files from being overwritten. Instead of doing it in two go's (1st request to check if the file exists,…

ike
- 1
- 1
0
votes
1 answer
How to make datastore query faster without adding indices
I have the following simple query:
client = datastore.Client('fmy_project')
query = client.query(kind='kind1')
query.add_filter('x', '=','y')
for row in query.fetch():
#process the row and save to file
It takes me for 100 rows 5 seconds to…

David Michael Gang
- 7,107
- 8
- 53
- 98
0
votes
1 answer
"ImportError: no module named pandas" when trying to submit a job on Dataproc
I'm running a script using the Python Client Library for Google Cloud Dataproc that automatically provisions clusters, submits jobs, etc. But while trying to submit a job, it returns with ImportError: no module named pandas. I import pandas, as well…

claudiadast
- 419
- 1
- 9
- 18
0
votes
1 answer
Error when submitting a pyspark job to dataproc cluster (job not found)
I have a script based on a python client library from GCP that is meant to provision clusters and submit jobs to them. When I run the script, it successfully uploads files to google storage, creates a cluster, and submits a job. The error comes in…

claudiadast
- 419
- 1
- 9
- 18
0
votes
1 answer
Adding machine-type parameters in Google Cloud Python SDK create_cluster() function
Google cloud's python docs have a script (python-docs-samples/dataproc/submit_job_to_cluster.py) that has the following function:
def create_cluster(dataproc, project, zone, region, cluster_name):
print('Creating cluster...')
zone_uri =…

claudiadast
- 419
- 1
- 9
- 18
0
votes
1 answer
Why google-cloud-python's vision API returns multiple annotations?
I am working with Google cloud vision API with Python
(https://googlecloudplatform.github.io/google-cloud-python/stable/vision-usage.html)
But I could not understand why the annotation result of a single image consists of list of annotations.
The…

keisuke
- 2,123
- 4
- 20
- 31
0
votes
1 answer
Manipulating Time Series data in Google-cloud library
I am trying to get data from a custom Stackdriver metric using the Google-Cloud Python library, but beyond returning it as a pandas dataframe I can't get the values I need.
For example the query, which looks something like:
query =…

grinferno
- 524
- 8
- 23
0
votes
2 answers
Authentication to Google Cloud Python API Library stopped working
I have problems with the authentication in the Python Library of Google Cloud API.
At first it worked for some days without problem, but suddenly the API calls are not showing up in the API Overview of the Google CloudPlatform.
I created a service…

elcombato
- 473
- 1
- 4
- 16
0
votes
1 answer
trouble with importing gcloud libs in python script
I have updated gcloud components. I have installed BigQuery lib using pip install following the instructions in the online doc. I am running Python 2.7.10.
when I run a python script that has the following line:
from google.cloud import…

FZF
- 855
- 4
- 12
- 29
0
votes
2 answers
google-cloud-storage library from nosetests using testbed
I have google-cloud-storage pip installed into a lib directory and vendored in. It's running just fine locally during development of my python appengine app. However, when trying to run unit tests via nose and testbed I'm getting "The…

jcjones1515
- 471
- 4
- 12
0
votes
2 answers
Google Vision API Error Code
I am trying the example code in
https://googlecloudplatform.github.io/google-cloud-python/stable/vision-usage.html
from google.cloud import vision
client = vision.Client()
image = client.image('./image.jpg')
safe_search =…

barkha mehra
- 34
- 6
0
votes
2 answers
google-app-engine fails to run Cron job and gives an ImportError: No module named gcloud
app-engine fails to import gcloud
used gcloud app deploy app.yaml \cron.yaml to deploy on google app engine
opened on browser and get:
Traceback (most recent call last):
File…

Analytics360
- 31
- 1
- 8
0
votes
1 answer
What is "well known" file associated with ``gcloud`` command line tool
In some gcloud code I'm finding a comment:
Stored "well known" file associated with gcloud command line tool
What is this "well known" file?

jbrown
- 7,518
- 16
- 69
- 117