错误部署图像处理功能
Error deploy the image processing function
我正在按照 Google 云网站 (https://cloud.google.com/functions/docs/tutorials/ocr?hl=en_GB#functions-prepare-environment-python) 上的 OCR 教程进行操作,但是,我无法部署图像处理 function.This 是我的命令 运行:
gcloud functions deploy ocr-extract \
--runtime python39 \
--trigger-bucket YOUR_IMAGE_BUCKET_NAME \
--entry-point process_image \
--set-env-vars "^:^GCP_PROJECT=YOUR_GCP_PROJECT_ID:TRANSLATE_TOPIC=YOUR_TRANSLATE_TOPIC_NAME:RESULT_TOPIC=YOUR_RESULT_TOPIC_NAME:TO_LANG=es,en,fr,ja"
我得到的错误是:
ERROR: (gcloud.functions.deploy) unrecognized arguments: \
To search the help text of gcloud commands, run:
gcloud help -- SEARCH_TERMS
'--runtime' is not recognized as an internal or external command,
operable program or batch file.
'--trigger-bucket' is not recognized as an internal or external command,
operable program or batch file.
'--entry-point' is not recognized as an internal or external command,
operable program or batch file.
'--set-env-vars' is not recognized as an internal or external command,
operable program or batch file.
有人知道怎么解决吗?如有任何帮助,我们将不胜感激!
提供的示例是面向linux/unix的,它使用连续字符\
来发出多行命令,但您很可能运行是windows中的命令。
如果是这种情况,请尝试在一行中提供整个命令或使用等效的连续字符:this SO question 提供了在不同 windows 版本中使用多行命令的多种选择,在 cmd 和 Powershell 中,总而言之,正如@TimRoberts 在他的评论中指出的那样,您可以在 cmd 中使用插入符号 ^
命令或在 Powershell 中使用反勾号 `。
我正在按照 Google 云网站 (https://cloud.google.com/functions/docs/tutorials/ocr?hl=en_GB#functions-prepare-environment-python) 上的 OCR 教程进行操作,但是,我无法部署图像处理 function.This 是我的命令 运行:
gcloud functions deploy ocr-extract \
--runtime python39 \
--trigger-bucket YOUR_IMAGE_BUCKET_NAME \
--entry-point process_image \
--set-env-vars "^:^GCP_PROJECT=YOUR_GCP_PROJECT_ID:TRANSLATE_TOPIC=YOUR_TRANSLATE_TOPIC_NAME:RESULT_TOPIC=YOUR_RESULT_TOPIC_NAME:TO_LANG=es,en,fr,ja"
我得到的错误是:
ERROR: (gcloud.functions.deploy) unrecognized arguments: \
To search the help text of gcloud commands, run:
gcloud help -- SEARCH_TERMS
'--runtime' is not recognized as an internal or external command,
operable program or batch file.
'--trigger-bucket' is not recognized as an internal or external command,
operable program or batch file.
'--entry-point' is not recognized as an internal or external command,
operable program or batch file.
'--set-env-vars' is not recognized as an internal or external command,
operable program or batch file.
有人知道怎么解决吗?如有任何帮助,我们将不胜感激!
提供的示例是面向linux/unix的,它使用连续字符\
来发出多行命令,但您很可能运行是windows中的命令。
如果是这种情况,请尝试在一行中提供整个命令或使用等效的连续字符:this SO question 提供了在不同 windows 版本中使用多行命令的多种选择,在 cmd 和 Powershell 中,总而言之,正如@TimRoberts 在他的评论中指出的那样,您可以在 cmd 中使用插入符号 ^
命令或在 Powershell 中使用反勾号 `。