![](/img/trans.png)
[英]Deploying an app on Google Cloud Platform - ImportError for pyzbar
[英]Error while deploying Flask app on Google Cloud Platform
当我尝试部署到Google App Engine时出现此错误:错误:(gcloud.app.deploy)错误响应:[3]。 这是我在GCP上首次试用Flask应用,因此我不确定如何处理。
ERROR: (gcloud.app.deploy) Error Response: [3] The following errors occurred while copying files to App Engine:
File https://storage.googleapis.com/staging.<app_id>.appspot.com/02aad073e7e7b22302caeca9aa3d6aaf227d7d91 failed with: Conflicting SHA1 sum for file. Expected "e0962ea6_8c330ca4_d3fff179_b1f68032_ef476e8e" but received "02aad073_e7e7b223_02caeca9_aa3d6aaf_227d7d91".
Details: [
[
{
"@type": "type.googleapis.com/google.rpc.ResourceInfo",
"description": "Conflicting SHA1 sum for file. Expected \"e0962ea6_8c330ca4_d3fff179_b1f68032_ef476e8e\" but received \"02aad073_e7e7b223_02caeca9_aa3d6aaf_227d7d91\".",
"resourceName": "https://storage.googleapis.com/staging.<app_id>.appspot.com/02aad073e7e7b22302caeca9aa3d6aaf227d7d91",
"resourceType": "file"
}
]
]
对于具有完全相同描述的10个不同资源名称,总共有10个类似错误。 文件的SHA1总和冲突是什么意思? 我尝试删除临时存储区以删除与资源名称相同的临时文件(在这种情况下为02aad073e7e7b22302caeca9aa3d6aaf227d7d9),导致该错误,但似乎不起作用。
您有2个使用相同名称上传的不同文件。
要确定这是否确实是您的部署或登台存储桶的问题,请创建一个新的干净存储桶,然后使用该新存储桶作为登台存储桶再次尝试进行部署:
$ gsutil mb gs://new-staging-bucket
$ gcloud app deploy --bucket gs://new-staging-bucket
如果您在清理存储区时遇到相同的错误,那么您将在部署过程中以某种方式上载几个不同的文件。
如果使用干净的存储桶有效,则问题出在部署期间使用的存储桶。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.