Importing translate from google.cloud

I am trying to do translate a document with google translate from the package google.cloud I already did: pip install google.cloud and the result was: Collecting google.cloud Using cached...

Google Cloud Dataflow (Python) - Not installing dependencies correctly

I'm trying to run the official Dataflow example here:https://github.com/GoogleCloudPlatform/dataflow-prediction-example However, the Dataflow job is not able to start correctly (and the same error...

ImportError: cannot import name 'pubsub_v1' from 'google.cloud' (unknown location)

I am trying to import the pubsub_v1 in a cloud function. But when I tried to deploy it on GCP, the problem as in the title coming out. The requirements.txt file is in the same directory as the...

Docker build taking too long when installing grpcio via pip

I have a Dockerfile which installs a few packages via pip. Some of them are requiring grpcio, and it takes a few minutes only to build this part. Does anyone have a tip to speed up this...

Unable to run Google Cloud Python Pubsub examples

I'm running Python 2.7.14, Windows machine and I've been trying to see up a simple pubsub sample using the Google Cloud Python library to get it all to work, but for some reason, none of the...

Error importing cloud-spanner on apache beam 2.9

I am trying to update a few python apache beam scripts to the recent 2.9 version of apache beam. I am running into the following error when running a script that imports from google.cloud.spanner...

java.lang.NoSuchMethodError: com.google.common.base.CharMatcher.ascii()

I got this error on glassfish server java.lang.NoSuchMethodError: com.google.common.base.CharMatcher.ascii()Lcom/google/common/base/CharMatcher; at...

How to get messages from googles Pub/Sub sytsem by using the current pubsub subsciber

I need to receive published messages from googles Pub/Sub system by using a python based subscriber. For this I did the following steps: On the web console I created a project, a registry, a...

beam.io.ReadFromPubSub - ImportError: No module named iam.v1

I have a simple beam pipeline in which I am reading data from pub sub and writing to a file. I am running it on direct runner, the code is as follows: pubsub_data = ( p ...

How do I set up a Google Cloud Function (Python) to create a Google Cloud Project?

I have been using the GCP Python client library to automate project creation. I want to go serverless and use Cloud Functions and Pub/Sub. I can't figure out how to set up the dependencies and...

AttributeError: 'StreamingPullFuture' object has no attribute 'open'

I am trying to write a job which reads messages from subscriber and output it to bigquery. Python version used is 3.6 . I am receiving error as below while executing the code : Traceback (most...

Airflow Dag Run Stalls Mid-Run

I have setup airflow v1.10.6 on ubuntu, using python 3.6.8. and have written a simple practice dag that runs a set of 30 parallel tasks. I'm triggering the dag through the UI as this will be run...

How to pip install google cloud exceptions

I have this import statement in python: from google.cloud.exceptions import NotFound I get this exception: ModuleNotFoundError: No module named 'google.cloud.exceptions' My pip freeze has the...

Why is statsmodels package not working on Flask but is on ipython?

I am getting this import error from the scipy package. Please see requirements.txt for versions. This is only happening on Flask and not when I run the same code on ipython. Is there any reason...

Error creating universal sentence encoder embeddings using beam & tf transform

I have a simple beam pipline that takes some text and gets embeddings using universal sentence encoder with tf transform. Very similar to the demo made using tf 1. import tensorflow as tf import...

Getting error when adding PyPI package to Composer environment

I just created a new Cloud Composer environment and I'm getting an error when trying to add some PyPI packages to the environment (for example google-cloud-pubsub). This is the data about the...

Error in pyarrow while installing Apache Beam in Raspberry Pi

I'm using a Raspberry Pi 3 B+ and should be installing the Apache Beam SDK to connect it to Google Cloud Platform services such as Pub/Sub, Dataflow, and BigQuery. I've got Raspbian GNU/Linux 10...

Failed to build pyarrow (for python 3.7) with an error message ERROR: Could not build wheels for pyarrow which use PEP 517

I am trying to install apache-beam[gcp] in my virtual env. My python version is 3.7 My pip3 version is 20.0.2 when do try to install ( without sudo) and run the following:- pip3...

Breaking change for google-api-python-client 1.8.1 - AttributeError: module 'googleapiclient' has no attribute '__version__'

After upgrading to the new google-api-python-client 1.8.1 I'm receiving this error. Do we know if python 3.8 breaks the latest google-api-core? And whether there's a solution Traceback (most...

Adding google-cloud-storage to maven - NoClassDefFoundError

I am trying to add google-cloud-storage to my maven repo and it build/compiles fine but at runtime I keep getting java.lang.NoClassDefFoundError: com/google/cloud/http/CensusHttpModule at...

Docker + pubsub + subprocess hangs with no errors

I'm running pubsub in a docker container and am experiencing hangs after a few minutes. I've been running pubsub with similar commands outside of docker, and see no hangs (over 1 year running). I...

ClassNotFoundException when running `mvn endpoints-framework:openApiDocs`

I'm at the following step of a GCP openapi guide where I have to run a maven command to generate an openapi.json file. I'm following along with my own project, so this may or not be reproducible...

E501 line too long (144 > 79 characters)

subprocess.check_output(['scrapy', 'crawl', 'mySpider', '-a', f'url={self.url}', '-a', f'nbrPage={self.pages}', '-o', 'test.json']) # noqa I splitted the line into multiple ones and I got...

Breaking change for google-api-python-client 1.9.3 - AttributeError: module 'google.api_core' has no attribute 'gapic_v1'

Is anyone else getting the above? I can't for the life of me figure out why it's complaining about the google.api.core module. This was working for me last week, but since updating the...

Issue while installing instapy from pip

ERROR: Command errored out with exit status 1: command: /data/data/com.termux/files/usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] =...

Google-Cloud Videointelligence: ModuleNotFoundError: No module named 'google.api_core.operations_v1'

I want to use Google Cloud Videointelligence but I keep getting errors. Now I get > ModuleNotFoundError: No module named 'google.api_core.operations_v1' I have no idea how to install said...

which permission is missing to initialize spanner client?

Tried to create spanner client in gke pods, but got: File "/usr/local/lib/python3.7/site-packages/google/cloud/spanner_v1/database.py", line 519, in run_in_transaction with...

Using apache-airflow-providers-snowflake on airflow (no module named Snowflake)

I have installed package apache-airflow-providers-snowflake on airflow on docker and i am getting error No module named Snowflake Please refer attachment (check the error mentioned for the...

Cannot install google-api-core package in our python app (Google Cloud Platform) due to conflicting dependencies (Python 3)

When I tried to install the Google Core API package, it always gets errors for every different version of this package. The app is run in Python 3, and I got the following logs: The user requested...