On my dev server, Google Cloud Storage fails to save files during a PUT command.
This same command works fine on production. The response headers (see below) have little debug information. I have plenty of space on my hard-drive, and I have been running the dev server as an administrator, so it should have all necessary permissions.
Any ideas?
Below is the relevant Traceback (I changed the bucket name):
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'}.
Update 2020 FYI, I raised this issue with Google here, and they said that they won't fix it because it has already been fixed, even though it clearly has not.
Update 2022 Still broken! See the proposed patch in the issue with Google.
It looks like there was an error while uploading the file to Google Cloud Storage. The response status was 500, which means there was an internal server error.
There could be a few reasons for this error. It could be due to a problem with the file you are trying to upload, or it could be due to a problem with the Google Cloud Storage server.
To troubleshoot the issue, you can try the following steps:
Check the size of the file you are trying to upload. Google Cloud Storage has a maximum file size limit of 5 TB. If your file is larger than this, it could be causing the error.
Check the file for any errors. Make sure it is a valid file and does not contain any corrupt data.
Check the Google Cloud Storage server logs for any errors or issues. You can find the logs in the Google Cloud Console.
Make sure you have the correct permissions to upload files to Google Cloud Storage.
If the issue persists, you can try contacting Google Cloud Support for further assistance. They will be able to help you troubleshoot the issue and provide a resolution.