Questions tagged [google-cloud-python]

Use this tag if you are going to refer something from Python libraries OR API Clients of Google Cloud Platform.

207 questions
0
votes
1 answer

google cloud: need python 3.6 and is 3.6 in ssh but still 3.5 in jupyter notebook

I need to use python 3.6 for a project and in the ssh when I typed python3 --version #Python 3.6.3 but in the jupyter notebook i opened, it is still import sys print(sys.version) 3.5.3 (default, Sep 27 2018, 17:25:39) [GCC 6.3.0 20170516] How…
0
votes
2 answers

Unable to List Redis Instances in my gcp project using the redis python API

This is the source code that I have written following the Redis_API documentation here What is the error that I am making https://googleapis.dev/python/redis/latest/gapic/v1/api.html from google.oauth2.service_account import Credentials from…
0
votes
1 answer

Google Cloud Vision Search Product Python Client - How to return more than 10 results?

Following the Google doc example I have this code: def get_similar_products_uri( project_id, location, product_set_id, product_category, image_uri, filter ): image_annotator_client = vision.ImageAnnotatorClient() image_source =…
0
votes
1 answer

What's the best way to handle SIGTERM and SIGINT signals in a pubsub service?

I have a relatively simple service written in python that is doing asynchronous pulls from a pubsub subscription and then running a subprocess on the messages it receives. I'm currently just calling result() and blocking indefinitely and letting the…
JoeS
  • 381
  • 2
  • 4
0
votes
1 answer

Installing and using version 1 of google cloud trace api client for python

I'm trying to write a script to extract Stackdriver Trace information to load into big query and I'm having trouble installing the python client library. I need version 1 of the library to access the data, but when I install google-cloud-trace it…
0
votes
0 answers

"No module named google.cloud" error when Python script is imported into a test, but not when run directly

Not sure if this is more google-cloud-related or pytest-related. See files below. When I run either python app/my_script.py or python -m app.my_script, the script runs fine. But when I run pytest, the line in the script from google.cloud import…
s2t2
  • 2,462
  • 5
  • 37
  • 47
0
votes
2 answers

Cannot get Firestore Quickstart to work in Python

I followed the quickstart guide for Firestore in Python but I couldn't get it to run as I got this error message: grpc._channel._Rendezvous: <_Rendezvous of RPC that terminated with: status = StatusCode.UNAVAILABLE details = "Name resolution…
0
votes
1 answer

GCS delete object using python client doesn't remove the resource using GET uri

Using the GCS python client, deleting a blob doesn't raise any exception. But performing GET on the URI that was just deleted, still returns the resource. The following code is part of a single file Flask app. from google.cloud import storage as…
androidguy
  • 3,005
  • 2
  • 27
  • 38
0
votes
0 answers

Python - Google Natural Language Processing API return HttpError 502 bad gateway

I'm working on a project using Python(3.6) and Django(2) in which I need to process too many(~ 50k) files from a directory by using Google cloud natural language processing API, but after processing ~400 files it returns an error as: Note: I have…
Abdul Rehman
  • 5,326
  • 9
  • 77
  • 150
0
votes
1 answer

Log Google Cloud Service Account key created in Python API script

I managed to create a service account and a key of itself via the Python API iamcredetials.googleapis.com but I can't log it in since the key is in P12 format and received as a dict, and I can't find the way to log the key in. is there a way to…
0
votes
0 answers

Python Google Cloud Natural Language API returns Bad Gateway error with status 502

I'm working on a project using Python(3.6) and Django(2) in which I need to process all text files from a directory using Google's Natural Language API python's Client. At the moment, there are 30 text files in my folder for testing purpose, the…
Abdul Rehman
  • 5,326
  • 9
  • 77
  • 150
0
votes
1 answer

BigQuery python client dropping some rows using Streaming API

I have around a million data items being inserted into BigQuery using streaming API (BigQuery Python Client's insert_row function), but there's some data loss, ~10,000 data items are lost while inserting. Is there a chance BigQuery might be dropping…
0
votes
0 answers

How to reliably reach convergence point in BQ?

As far as I know, Google Big Query follows "eventual consistency" architecture, meaning that table creation, schema changes and data import is non-synchronous. I'm building system that synchronize couple of tables with high update ratio to BQ (by…
Slam
  • 8,112
  • 1
  • 36
  • 44
0
votes
1 answer

Google Cloud Platform Pub Sub - Python Client Not Publishing Messages

The set up is this: I've got a topic set up to receive messages, and then I've got a Dataflow pipeline set up using the Pub/Sub to GCS Text Template that dumps the messages into windowed text files in a GCS Bucket. This works fine--I eventually get…
0
votes
1 answer

google.cloud.pubsub - Streaming Pull hogging PubSub Messages

I'm currently running some tests on the latest google-cloud-pubsub==0.35.4 pubsub release. My intention is to process a never ending stream (variating in load) using a dynamic amount of subscriber clients. However, when i have a queue of say.. 600…