GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Multiple upload and downloads fail · Issue #237 · googleapis/python-storage

This repository was archived by the owner on Mar 31, 2026. It is now read-only.
This repository was archived by the owner on Mar 31, 2026. It is now read-only.

Multiple upload and downloads fail #237

Copy link
Copy link
Closed
#238
Closed
Multiple upload and downloads fail#237
#238
Copy link
Assignees
HemangChothani
Labels
api: storageIssues related to the googleapis/python-storage API.priority: p1Important issue which blocks shipping the next release. Will be fixed prior to next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

Description

@AndrewAXue
AndrewAXue
opened on Aug 10, 2020
Issue body actions

Environment details

  • OS type and version: Linux rodete
  • Python version: Python 3.8.5
  • pip version: pip 20.0.2
  • google-cloud-storage version: 1.30.0

Steps to reproduce

Run:

from google.cloud import storage
client = storage.Client()
bucket = client.get_bucket('fishbucket1')
blob2 = bucket.blob('file')
blob2.upload_from_string('hi')
blob2.download_as_string()
blob2.upload_from_string('hi')

Stack trace

Traceback (most recent call last):
  File "/usr/local/google/home/aaxue/Documents/google/temp/lib/python3.8/site-packages/google/cloud/storage/blob.py", line 1910, in upload_from_file
    created_json = self._do_upload(
  File "/usr/local/google/home/aaxue/Documents/google/temp/lib/python3.8/site-packages/google/cloud/storage/blob.py", line 1758, in _do_upload
    response = self._do_multipart_upload(
  File "/usr/local/google/home/aaxue/Documents/google/temp/lib/python3.8/site-packages/google/cloud/storage/blob.py", line 1404, in _do_multipart_upload
    response = upload.transmit(
  File "/usr/local/google/home/aaxue/Documents/google/temp/lib/python3.8/site-packages/google/resumable_media/requests/upload.py", line 148, in transmit
    self._process_response(response)
  File "/usr/local/google/home/aaxue/Documents/google/temp/lib/python3.8/site-packages/google/resumable_media/_upload.py", line 116, in _process_response
    _helpers.require_status_code(response, (http_client.OK,), self._get_status_code)
  File "/usr/local/google/home/aaxue/Documents/google/temp/lib/python3.8/site-packages/google/resumable_media/_helpers.py", line 106, in require_status_code
    raise common.InvalidResponse(
google.resumable_media.common.InvalidResponse: ('Request failed with status code', 400, 'Expected one of', <HTTPStatus.OK: 200>)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "t", line 7, in <module>
    blob2.upload_from_string('hi')
  File "/usr/local/google/home/aaxue/Documents/google/temp/lib/python3.8/site-packages/google/cloud/storage/blob.py", line 2097, in upload_from_string
    self.upload_from_file(
  File "/usr/local/google/home/aaxue/Documents/google/temp/lib/python3.8/site-packages/google/cloud/storage/blob.py", line 1925, in upload_from_file
    _raise_from_invalid_response(exc)
  File "/usr/local/google/home/aaxue/Documents/google/temp/lib/python3.8/site-packages/google/cloud/storage/blob.py", line 3262, in _raise_from_invalid_response
    raise exceptions.from_http_status(response.status_code, message, response=response)
google.api_core.exceptions.BadRequest: 400 POST https://storage.googleapis.com/upload/storage/v1/b/fishbucket1/o?uploadType=multipart: ('Request failed with status code', 400, 'Expected one of', <HTTPStatus.OK: 200>)

Activity

  1. product-auto-label
    added
    api: storageIssues related to the googleapis/python-storage API.
    on Aug 10, 2020
  2. HemangChothani
    added
    priority: p1Important issue which blocks shipping the next release. Will be fixed prior to next release.
    type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.
    on Aug 11, 2020
  3. HemangChothani
    self-assigned this
    on Aug 11, 2020
  4. tseaver
    closed this as completedin #238on Aug 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @HemangChothani
    HemangChothani

Labels

api: storageIssues related to the googleapis/python-storage API.priority: p1Important issue which blocks shipping the next release. Will be fixed prior to next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.