使用以下 bash 命令進(jìn)行部署時(shí):gcloud functions deploy my_gcf --runtime python37 --trigger-http --memory=512MB --region europe-west1 --service-account=my-service-account@my-project.iam.gserviceaccount.com --allow-unauthenticated --verbosity debug我不斷得到:FunctionsError: OperationError: code=13, message=Function deployment failed due to a health check failure. This usually indicates that your code was built successfully but failed during a test execution. Examine the logs to determine the cause.不幸的是,在檢查日志時(shí),除了以下內(nèi)容之外,我沒有得到任何特別的信息:Error: function terminated. Recommended action: inspect logs for termination reason. Function cannot be initialized.正如您所看到的,我指定了 --verbosity 標(biāo)志,但它似乎沒有一點(diǎn)幫助。所有軟件包均已安裝,并且我已按照此處的文檔構(gòu)建存儲庫:在我的代碼中,我既有一個(gè)requirements.txt文件,也有我編碼的自定義軟件包,但我想我會從該錯(cuò)誤中得到另一種錯(cuò)誤多于。我的要求.txt:beautifulsoup4==4.8.0boto==2.49.0boto3==1.13.25botocore==1.16.25cachetools==4.1.0cloudpickle==0.8.1flask==1.0.2flask-restplus==0.12.1functions-framework==2.0.0gensim==3.8.3google-api-core==1.17.0google-api-python-client==1.7.8google-auth==1.15.0google-auth-httplib2==0.0.3google-auth-oauthlib==0.4.1google-cloud==0.34.0google-cloud-core==0.29.1google-cloud-pubsub==0.45.0google-cloud-storage==1.14.0google-cloud-vision==1.0.0grpc-google-iam-v1==0.12.3grpcio==1.29.0gunicorn==19.9.0jinja2==2.10jsonschema==3.2.0more-itertools==8.3.0nltk==3.4.4numpy==1.18.4pandas==1.0.3protobuf==3.12.1requests==2.23.0requests-oauthlib==1.3.0scikit-learn==0.23.1scikit-plot==0.3.7scipy==1.4.1setuptools==46.4.0tempurllib3==1.25.9werkzeug==0.14.1yarl==1.4.2
Google Cloud Function:FunctionsError
慕無忌1623718
2023-09-12 19:07:00