在我的开发服务器上,Google Cloud Storage在PUT
命令期间无法保存文件。
在生产环境中,这个命令很好用。响应标题(见下文)提供的调试信息很少。我硬盘有足够的空间,运行开发服务器时我以管理员身份运行,所以它应该拥有所有必要的权限。
有任何想法吗?
以下是相关的Traceback(我更改了存储桶名称):
INFO 2015-08-07 14:14:41,415 module.py:809] default: "PUT /_ah/gcs/bucket/IPR2013-00219%2C%20No.%2016%20Institution%20Decision%20-%20Decis_2015-08-07%2018-14-25.100000.pdf?upload_id=encoded_gs_file%3AZG9ja2V0YWxhcm0tZGV2L0lQUjIwMTMtMDAyMTksIE5vLiAxNiBJbnN0aXR1dGlvbiBEZWNpc2lvbiAtIERlY2lzXzIwMTUtMDgtMDcgMTgtMTQtMjUuMTAwMDAwLnBkZg%3D%3D HTTP/1.1" 500 -
Traceback (most recent call last):
File "Project\libs\cloudstorage\storage_api.py", line 794, in __exit__
self.close()
File "Project\libs\cloudstorage\storage_api.py", line 787, in close
self._flush(finish=True)
File "Project\libs\cloudstorage\storage_api.py", line 841, in _flush
self._send_data(data, self._written, file_len)
File "Project\libs\cloudstorage\storage_api.py", line 874, in _send_data
{'upload_path': self._path_with_token})
File "Project\libs\cloudstorage\errors.py", line 141, in check_status
raise ServerError(msg)
ServerError: Expect status [200] from Google Storage. But got status 500.
Path: '/bucket/IPR2013-00219%2C%20No.%2016%20Institution%20Decision%20-%20Decis_2015-08-07%2018-14-25.100000.pdf'.
Request headers: {'accept-encoding': 'gzip, *', 'content-range': 'bytes 0-195060/195061', 'x-goog-api-version': '2'}.
Response headers: {'date': 'Fri, 07 Aug 2015 18:14:41 GMT', 'transfer-encoding': 'chunked', 'server': 'Development/2.0'}.
Body: ''.
Extra info: {'upload_path': '/bucket/IPR2013-00219%2C%20No.%2016%20Institution%20Decision%20-%20Decis_2015-08-07%2018-14-25.100000.pdf?upload_id=encoded_gs_file%3AZG9ja2V0YWxhcm0tZGV2L0lQUjIw
MTMtMDAyMTksIE5vLiAxNiBJbnN0aXR1dGlvbiBEZWNpc2lvbiAtIERlY2lzXzIwMTUtMDgtMDcgMTgtMTQtMjUuMTAwMDAwLnBkZg%3D%3D'}.
2020年更新: 值得一提的是,我已经在这里向Google提出了该问题,但他们说不会修复它,因为它已经被修复了,尽管显然没有。
2022年更新: 仍然有问题!请参阅与Google的问题中所提议的补丁。