question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Getting 'GS' key error when reading a csv from GCS using gcsfc

See original GitHub issue

Hi I upgraded gcsfs and now I get the following error:

My code is pretty simple:

data = dd.read_csv(file_path, parse_dates=[date_column])\
        .compute()
    return data```

It used to work but all of a sudden it stopped working.
file_path = gs://mybuck/res.csv

```File "main.py", line 51, in run
    data = load_parse_file(file_path=args.input_file)
  File "/FbProphet/prophet_gcp/utils.py", line 15, in load_parse_file
    data = dd.read_csv(file_path, parse_dates=[date_column])\
  File "/work/miniconda/lib/python3.7/site-packages/dask/dataframe/io/csv.py", line 578, in read
    **kwargs
  File "/work/miniconda/lib/python3.7/site-packages/dask/dataframe/io/csv.py", line 405, in read_pandas
    **(storage_options or {})
  File "/work/miniconda/lib/python3.7/site-packages/dask/bytes/core.py", line 93, in read_bytes
    fs, fs_token, paths = get_fs_token_paths(urlpath, mode="rb", storage_options=kwargs)
  File "/work/miniconda/lib/python3.7/site-packages/dask/bytes/core.py", line 425, in get_fs_token_paths
    fs, fs_token = get_fs(protocol, options)
  File "/work/miniconda/lib/python3.7/site-packages/dask/bytes/core.py", line 571, in get_fs
    cls = _filesystems[protocol]
KeyError: 'gs'

Issue Analytics

  • State:open
  • Created 4 years ago
  • Comments:10 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
chwonghk01commented, Jul 26, 2019

Tried that dask==2.1.0 and gcsfs==0.2.3 would work.

1reaction
martindurantcommented, Jul 25, 2019

@PoradaKev - you a version of gcsfs that is too new for Dask. Either downgrade, or install Dask from master.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Getting 'GS' key error when reading a csv from GCS using gcsfc
Hi I upgraded gcsfs and now I get the following error: My code is pretty simple: data = dd.read_csv(file_path, parse_dates=[date_column])\ ...
Read more >
Struggling to read csv files from Google Cloud Storage bucket
There are some CSV files in a folder of a GCS bucket. I am using these codes to access and read those CSV...
Read more >
Loading CSV data from Cloud Storage | BigQuery
Describes how to load CSV data from Cloud Storage to BigQuery. ... For Encryption, click Customer-managed key to use a Cloud Key Management...
Read more >
GCSFS - Read the Docs
A pythonic file-system interface to Google Cloud Storage. This software is beta, use at your own risk. Please file issues and requests on...
Read more >
csv — CSV File Reading and Writing — Python 3.11.1 ...
The csv module implements classes to read and write tabular data in CSV format. It allows programmers to say, “write this data in...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found