Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adding extra_header causing issue while reading GCS file in colab #30416

Open
ajitsonawane1 opened this issue Feb 26, 2024 · 4 comments
Open

Comments

@ajitsonawane1
Copy link

With the latest code changes in version 2.54.0 (introducing extra_headers), we started receiving an error while reading a file from gcs using the following code.

Just wanted to report that and wanted to know if this extra_headers field can be removed.

Code : <following apache-beam python code, we used to read GCS files>

import apache_beam as beam
with beam.Pipeline() as pipeline:
 # Read from the input file on GCS
 lines = pipeline | beam.io.ReadFromText(GCS_URI)

Encountered Error:

Match operation failed with exceptions {'gs://mappings/transaction.ndjson': TypeError("Client.__init__() got an unexpected keyword argument 'extra_headers'")}
@minhajpasha
Copy link

It was also happening to me, any ideas on how to fix it?

@ajitsonawane1
Copy link
Author

@minhajpasha,

As a workaround, you can install and use version 2.53.0 of Apache Beam.

pip install apache-beam==2.53.0

@minhajpasha
Copy link

@ajitsonawane1 - Google recommendation :We'd recommend that you install v2.16.0 (the latest version) of the google-cloud-storage to resolve this issue. It worked for me

@samtseng18
Copy link

@ajitsonawane1 - Google recommendation :We'd recommend that you install v2.16.0 (the latest version) of the google-cloud-storage to resolve this issue. It worked for me

This worked for me too. Thanks! I had been stuck on this for a while :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants