FsspecStore glob fails with "Last-Modified Header missing from response"
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 35/100
Research direction
Start at obstore/fsspec.py, especially FsspecStore.glob and _info, and reproduce the reported call against the public GCS bucket. Trace why glob passes an empty path to head_async; done means glob handles the bucket root without raising the missing Last-Modified error and still returns the matching objects.
Written by the indexing model from the issue text.
Description
[nav] In [21]: from obstore.fsspec import FsspecStore
...: FsspecStore("gs").glob("gs://gcp-public-data-landsat/*.csv.gz")
---------------------------------------------------------------------------
GenericError Traceback (most recent call last)
Input In [21], in <cell line: 0>()
1 from obstore.fsspec import FsspecStore
----> 2 FsspecStore("gs").glob("gs://gcp-public-data-landsat/*.csv.gz")
File ~/model312/.venv/lib/python3.13/site-packages/fsspec/asyn.py:118, in sync_wrapper.<locals>.wrapper(*args, **kwargs)
115 @functools.wraps(func)
116 def wrapper(*args, **kwargs):
117 self = obj or args[0]
--> 118 return sync(self.loop, func, *args, **kwargs)
File ~/model312/.venv/lib/python3.13/site-packages/fsspec/asyn.py:103, in sync(loop, func, timeout, *args, **kwargs)
101 raise FSTimeoutError from return_result
102 elif isinstance(return_result, BaseException):
--> 103 raise return_result
104 else:
105 return return_result
File ~/model312/.venv/lib/python3.13/site-packages/fsspec/asyn.py:56, in _runner(event, coro, result, timeout)
54 coro = asyncio.wait_for(coro, timeout=timeout)
55 try:
---> 56 result[0] = await coro
57 except Exception as ex:
58 result[0] = ex
File ~/model312/.venv/lib/python3.13/site-packages/fsspec/asyn.py:804, in AsyncFileSystem._glob(self, path, maxdepth, **kwargs)
801 else:
802 depth = None
--> 804 allpaths = await self._find(
805 root, maxdepth=depth, withdirs=True, detail=True, **kwargs
806 )
808 pattern = glob_translate(path + ("/" if ends_with_sep else ""))
809 pattern = re.compile(pattern)
File ~/model312/.venv/lib/python3.13/site-packages/fsspec/asyn.py:846, in AsyncFileSystem._find(self, path, maxdepth, withdirs, **kwargs)
842 detail = kwargs.pop("detail", False)
844 # Add the root directory if withdirs is requested
845 # This is needed for posix glob compliance
--> 846 if withdirs and path != "" and await self._isdir(path):
847 out[path] = await self._info(path)
849 # async for?
File ~/model312/.venv/lib/python3.13/site-packages/fsspec/asyn.py:677, in AsyncFileSystem._isdir(self, path)
675 async def _isdir(self, path):
676 try:
--> 677 return (await self._info(path))["type"] == "directory"
678 except OSError:
679 return False
File ~/model312/.venv/lib/python3.13/site-packages/obstore/fsspec.py:488, in FsspecStore._info(self, path, **_kwargs)
485 store = self._construct_store(bucket)
487 try:
--> 488 head = await obs.head_async(store, path_no_bucket)
489 return {
490 # Required of `info`: (?)
491 "name": head["path"],
(...)
497 "version": head["version"],
498 }
499 except FileNotFoundError:
GenericError: Generic GCS error: Last-Modified Header missing from response
Debug source:
Generic {
store: "GCS",
source: Header {
source: MissingLastModified,
},
}
Looks like glob is trying to get access the root bucket "object" which isn't really there?
[ins] In [22]: %debug
> /Users/brett/model312/.venv/lib/python3.13/site-packages/obstore/fsspec.py(488)_info()
486
487 try:
--> 488 head = await obs.head_async(store, path_no_bucket)
489 return {
490 # Required of `info`: (?)
ipdb> store
GCSStore(bucket="gcp-public-data-landsat")
ipdb> path_no_bucket
''
- Dominant language
- Python
- Stars
- 842
- Forks
- 50
- Avg merge
- 9h
- Merged PRs (30d)
- 13
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from developmentseed/obstore
-
fsspec: `get_file` silently writes nothing for `file://` and Windows pathsPossibly taken @andyhetianjun claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 58/100
developmentseed/obstore#830 ·
Maintainers usually reply within 1 day
-
Difficulty 5/5 Over a week Newbie friendliness 15/100
developmentseed/obstore#823 ·
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
developmentseed/obstore#819 ·
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 18/100
developmentseed/obstore#816 · 3 comments ·
Maintainers usually reply within 1 day
-
`put_async(Path)` opens files synchronously while holding the GILPossibly taken @kylebarron claimed this 14 days ago. Open
Difficulty 4/5 3-5 days Newbie friendliness 48/100
developmentseed/obstore#809 · 1 comment ·
Maintainers usually reply within 1 day
All issues in developmentseed/obstore
Similar issues
-
00 - Bug component: numpy.linalg
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 72/100
521xueweihan/HelloGitHub#4543 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 83/100
emeryberger/CSrankings#15700 ·
Maintainers usually reply within 2 days
-
Bug | 工作不正常 Triage | 待检查
Difficulty 2/5 1-3 hours Newbie friendliness 77/100
OneDragon-Anything/ZenlessZoneZero-OneDragon#3084 ·
Maintainers usually reply within 1 day
-
Task select patterns with uppercase letters never matchPossibly taken @manobhisriram claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day