Google Cloud Function で関数をデプロイしたいのですが、
次のようなエラーが表示され、エプロイに失敗してしまいます。
対策お分かりになる方がいらっしゃればご教示いただければ幸いです。
デプロイに失敗しました:
Build failed: {"error": {"canonicalCode": "INVALID_ARGUMENT", "errorMessage": "pip_download_wheels
had stderr output:\nInvalid requirement: 'Function dependencies, for example:'\nTraceback (most recent call last):\n File "/opt/python3.7/lib/python3.7/site-packages/pip/_vendor/packaging/requirements.py", line 93, in init\n req = REQUIREMENT.parseString(requirement_string)\n File "/opt/python3.7/lib/python3.7/site-packages/pip/_vendor/pyparsing.py", line 1632, in parseString\n raise exc\n File "/opt/python3.7/lib/python3.7/site-packages/pip/_vendor/pyparsing.py", line 1622, in parseString\n loc, tokens = self._parse( instring, 0 )\n File "/opt/python3.7/lib/python3.7/site-packages/pip/_vendor/pyparsing.py", line 1379, in _parseNoCache\n loc,tokens = self.parseImpl( instring, preloc, doActions )\n File "/opt/python3.7/lib/python3.7/site-packages/pip/_vendor/pyparsing.py", line 3395, in parseImpl\n loc, exprtokens = e._parse( instring, loc, doActions )\n File "/opt/python3.7/lib/python3.7/site-packages/pip/_vendor/pyparsing.py", line 1383, in _parseNoCache\n loc,tokens = self.parseImpl( instring, preloc, doActions )\n File "/opt/python3.7/lib/python3.7/site-packages/pip/_vendor/pyparsing.py", line 3183, in parseImpl\n raise ParseException(instring, loc, self.errmsg, self)\npip._vendor.pyparsing.ParseException: Expected stringEnd (at char 9), (line:1, col:10)\n\nDuring handling of the above exception, another exception occurred:\n\nTraceback (most recent call last):\n File "/opt/python3.7/lib/python3.7/site-packages/pip/_internal/req/req_install.py", line 253, in from_line\n req = Requirement(req)\n File "/opt/python3.7/lib/python3.7/site-packages/pip/_vendor/packaging/requirements.py", line 97, in init\n requirement_string[e.loc:e.loc + 8]))\npip._vendor.packaging.requirements.InvalidRequirement: Invalid requirement, parse error at "'dependen'"\n\n\nerror: pip_download_wheels
returned code: 1", "errorType": "InternalError", "errorId": "D4CDF107"}}
<main.py>
python
1 2import base64 3 4def hello_pubsub(event, context): 5 """Triggered from a message on a Cloud Pub/Sub topic. 6 Args: 7 event (dict): Event payload. 8 context (google.cloud.functions.Context): Metadata for the event. 9 """ 10 pubsub_message = base64.b64decode(event['data']).decode('utf-8') 11 print(pubsub_message) 12
<REQUIREMENTS.TXT>
python
1Function dependencies, for example: 2package>=version
<その他環境等>
トリガー Cloud Pub/Sub
リージョンus-central1
割り当てられたメモリ128 MB
python3.7
ソースコード インラインエディタ
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。