Unable to use ls and open operations because of threading error

Open
#465 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
25/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
python
Domain
cloud

Research direction

Start by reproducing the documented gcsfs ls() and open() examples, then follow the traceback through gcsfs/core.py (_open and GCSFile) into fsspec/spec.py and fsspec/asyn.py. Done means identifying why the operations wait indefinitely and confirming that the calls complete or documenting the required fix or configuration.

Written by the indexing model from the issue text.

Description

Hi, I tried the ls() and open() operations following the examples stated here: https://gcsfs.readthedocs.io/en/latest/
I get no result for both the calls. When I interrupt, I see the traceback as mentioned below.

import gcsfs
import pandas as pd

fs = gcsfs.GCSFileSystem(project='<my-bucket-name>', access="read_only")
with fs.open('<my-bucket-name>/<my-blob-name>.pickle', 'rb') as f:
    df = pd.read_csv(f) 
print(df)

Traceback:

^CTraceback (most recent call last):
File "./test/test_bucket_creation.py", line 122, in
with fs.open('my-workbench-bucket-90e20451-938e-4665-856c-a90a45083a40/sxmant4_test_1.pickle', 'rb') as f:
File "/opt/anaconda3/lib/python3.8/site-packages/fsspec/spec.py", line 1009, in open
f = self._open(
File "/opt/anaconda3/lib/python3.8/site-packages/gcsfs/core.py", line 1150, in _open
return GCSFile(
File "/opt/anaconda3/lib/python3.8/site-packages/gcsfs/core.py", line 1270, in init
super().init(
File "/opt/anaconda3/lib/python3.8/site-packages/fsspec/spec.py", line 1351, in init
self.size = self.details["size"]
File "/opt/anaconda3/lib/python3.8/site-packages/fsspec/spec.py", line 1364, in details
self._details = self.fs.info(self.path)
File "/opt/anaconda3/lib/python3.8/site-packages/fsspec/asyn.py", line 85, in wrapper
return sync(self.loop, func, *args, **kwargs)
File "/opt/anaconda3/lib/python3.8/site-packages/fsspec/asyn.py", line 53, in sync
if event.wait(1):
File "/opt/anaconda3/lib/python3.8/threading.py", line 558, in wait
signaled = self._cond.wait(timeout)
File "/opt/anaconda3/lib/python3.8/threading.py", line 306, in wait
gotit = waiter.acquire(True, timeout)
KeyboardInterrupt

Would like to know if I am doing something wrong here, or if there is an issue to be fixed.
Thank you!

Dominant language
Python
Stars
398
Forks
181
Avg merge
2d 10h
Merged PRs (30d)
36

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from fsspec/gcsfs

All issues in fsspec/gcsfs

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.