Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Google storage buckets' get_key always throws an exception #2105

Open
engelke opened this Issue Feb 18, 2014 · 4 comments

Comments

Projects
None yet
5 participants

engelke commented Feb 18, 2014

Pull request #2067 says it fixed this, but it did not. I added a comment (#2067) to that pull request showing a simple test that fails. Also, release 2.25.0 fails the Google Storage tests distributed with the module.

@danielgtaylor danielgtaylor self-assigned this Feb 19, 2014

Owner

danielgtaylor commented Feb 19, 2014

Thanks for pointing this out. I'm trying to get some feedback from Google and am looking into what we can do to fix the issue.

rjschwei added a commit to rjschwei/boto that referenced this issue Feb 20, 2014

- fixes issue #2105
  + only attempt to restore a given header if the provider has a
    RESTORE_HEADER_KEY
Contributor

rjschwei commented Feb 20, 2014

Tested the fix in pull request 2112 by uploading a file to Google storage, worked for me.

@rjschwei rjschwei referenced this issue in GoogleCloudPlatform/gsutil Feb 20, 2014

Closed

Cannot cp or mv #182

I'm still seeing this bug with Google Storage get_key throws this error:

  File "/usr/local/lib/python2.7/site-packages/boto/s3/bucket.py", line 193, in get_key
    key, resp = self._get_key_internal(key_name, headers, query_args_l)
  File "/usr/local/lib/python2.7/site-packages/boto/s3/bucket.py", line 223, in _get_key_internal
    k.handle_restore_headers(response)
  File "/usr/local/lib/python2.7/site-packages/boto/s3/key.py", line 251, in handle_restore_headers
    header = response.getheader(provider.restore_header)
  File "/usr/local/lib/python2.7/httplib.py", line 716, in getheader
    return self.msg.getheader(name, default)
  File "/usr/local/lib/python2.7/rfc822.py", line 297, in getheader
    return self.dict.get(name.lower(), default)
AttributeError: 'NoneType' object has no attribute 'lower'

stmos commented Jan 6, 2017

@grivescorbett I got the exact same error. In my case it was related to #3665

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment