mirror of
https://github.com/fsouza/fake-gcs-server.git
synced 2026-04-25 13:45:52 +03:00
[GH-ISSUE #1751] Blob.download_to_filename does not work #217
Labels
No labels
bug
compatibility-issue
docker
documentation
enhancement
help wanted
needs information
pull-request
question
stale
unfortunate
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/fake-gcs-server#217
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Menghetz on GitHub (Sep 22, 2024).
Original GitHub issue: https://github.com/fsouza/fake-gcs-server/issues/1751
I am having everytime my python scripts uses the blob.download_to_filename method.
I am running the fake-gcs-server using this command
docker run --rm -p 4443:4443 fsouza/fake-gcs-server -scheme httpHere below is my Python script
And these are the execution logs
I can correctly upload files into the server, list the buckets and get blob info. But the code is stucked at download_to_filename
Here below is the error I am getting
Any idea about what the error could be?
@fsouza commented on GitHub (Sep 22, 2024):
Can you share the server logs?
@Menghetz commented on GitHub (Sep 22, 2024):
Sure! Here they are.
@dtabata commented on GitHub (Mar 11, 2025):
@Menghetz
Hello.
I was having the same error too, but Blob.download_to_filename() solved it.
I just wish
get_blob(...).download_to_filename(...)would work properly as this is a source of confusion.@fsouza commented on GitHub (Mar 11, 2025):
bucket.get_blob(...).download_to_filename(...)should work. See the examples folder: https://github.com/fsouza/fake-gcs-server/blob/main/examples/python/python.py@dtabata commented on GitHub (Mar 11, 2025):
@fsouza
Yes, I am aware of the Python EXAMPLE.
But for some reason it does not work.
The error log is as follows
error logs
Here is the log of fake-gcs-server at this time.
fake-gcs-server logs
The compose.yml and pyproject.toml are as follows
Are there any flaws in the configuration?
compose.yml and pyproject.toml
@fsouza commented on GitHub (Mar 11, 2025):
The example is validated by GitHub Actions on every change. You can see it working here: https://github.com/fsouza/fake-gcs-server/actions/runs/13772629106/job/38514639482
Please make sure you're following the instructions in the example file, or double check how CI runs it: https://github.com/fsouza/fake-gcs-server/blob/main/ci/run-python-example.sh
@dtabata commented on GitHub (Mar 11, 2025):
@fsouza
thx.
local code to
bucket.get_blob(...)tobucket.blob(...), which cured the problem.( Reverting to `get_blob(...)' will cause the problem to reoccur )
Sorry for the inconvenience 🙇♂️