GoogleCloudPlatform / GoogleCloudPlatform/gsutil

No such file or directory: google-cloud-sdk/platform/gsutil/gslib/CHECKSUM

Open
#1,866 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
918
Forks
335
PR merge metrics
No merged PRs in 30d

Description

I downloaded and installed google-cloud-cli-darwin-arm.tar.gz@521.0.0 with `install.sh`.
```
$ gcloud --version
Google Cloud SDK 521.0.0
bq 2.1.16
core 2025.05.02
gcloud-crc32c 1.0.0
gsutil 5.34

$ gsutil ls -al gs://huadongliu-pg
Traceback (most recent call last):
File "", line 1, in
File "/Users/huadongliu/Downloads/google-cloud-sdk/platform/gsutil/gslib/__init__.py", line 156, in
CHECKSUM_FILE, CHECKSUM = _GetFileContents('CHECKSUM')
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/huadongliu/Downloads/google-cloud-sdk/platform/gsutil/gslib/__init__.py", line 139, in _GetFileContents
content = pkgutil.get_data('gslib', filename)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/pkgutil.py", line 453, in get_data
return loader.get_data(resource_name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "", line 1190, in get_data
FileNotFoundError: [Errno 2] No such file or directory: '/Users/huadongliu/Downloads/google-cloud-sdk/platform/gsutil/gslib/CHECKSUM'
```
The issue can be worked around by copying the CHECKSUM from one level up. Looks like CHECKSUM only lands in gslib in a [custom distribution](https://github.com/GoogleCloudPlatform/gsutil/blob/master/setup.py#L67).

Contributor guide

Open the contributing guide

Research direction

Start with platform/gsutil/gslib/__init__.py, where CHECKSUM is loaded, then inspect setup.py and install.sh to compare the archive packaging with the custom distribution. Reproduce the install from google-cloud-cli-darwin-arm.tar.gz@521.0.0 and verify that gsutil ls no longer raises FileNotFoundError for the missing CHECKSUM file.

Written by the indexing model from the issue text.

Assessment

Tech stack
google-cloud, python
Domain
cli, cloud
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.