谷歌云存储的开发失败

2024-04-28 21:18:32 发布

您现在位置:Python中文网/ 问答频道 /正文

在我的开发服务器上,Google云存储在PUT命令期间无法保存文件。在

同样的命令在生产中也能很好地工作。响应头(见下文)几乎没有调试信息。我的硬盘上有足够的空间,而且我一直以管理员身份运行dev服务器,因此它应该具有所有必要的权限。在

有什么想法吗?在

以下是相关的回溯(我更改了bucket名称):

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'}.

Tags: inpyselfprojectapidatabucketpdf