Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/google-cloud-platform/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Google cloud platform 谷歌云功能:缺少main.py_Google Cloud Platform_Google Cloud Storage - Fatal编程技术网

Google cloud platform 谷歌云功能:缺少main.py

Google cloud platform 谷歌云功能:缺少main.py,google-cloud-platform,google-cloud-storage,Google Cloud Platform,Google Cloud Storage,尝试使用命令将Python项目部署到Google云函数时 gcloud函数部署my_函数--入口点回复--运行时Python 38--触发http--允许未经身份验证的 我明白了 部署功能(可能需要一段时间-最多2分钟)。。。⠛ 有关云构建Stackdriver日志,请访问: https://[…] 部署功能(可能需要一段时间-最多2分钟)…失败。 错误:(gcloud.functions.deploy)操作错误:代码=3,消息=Build 失败:未指定缺少main.py和GOOGLE_函数_源

尝试使用命令将Python项目部署到Google云函数时

gcloud函数部署my_函数--入口点回复--运行时Python 38--触发http--允许未经身份验证的

我明白了

部署功能(可能需要一段时间-最多2分钟)。。。⠛
有关云构建Stackdriver日志,请访问: https://[…] 部署功能(可能需要一段时间-最多2分钟)…失败。
错误:(gcloud.functions.deploy)操作错误:代码=3,消息=Build 失败:未指定缺少main.py和GOOGLE_函数_源。 在main.py中创建函数或指定 GOOGLE\u函数\u源指向包含 功能;错误ID:5c04ec9c

但我确实在文件夹中有一个
main.py
文件


我检查了平台,没有上载文件
main.py
,而文件夹中的文件是。

解决方案是从
中省略这一行。gcloudignore

#!include:.gitignore
我真的不明白为什么

我的
.gitignore
是:

.*
*.json