Reputation: 509
I am following the OCR tutorial on Google Cloud website (https://cloud.google.com/functions/docs/tutorials/ocr?hl=en_GB#functions-prepare-environment-python), however, I can't deploy the image processing function.This is the command I ran:
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"
The errors I get are:
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.
Does anyone know how to solve this? Any help would be appreciated!
Upvotes: 0
Views: 110
Reputation: 53411
The example provided is linux/unix oriented and it uses the continuation character \
for issuing multiline commands, but you are very likely running the command in windows.
If that is the case, please, try providing the whole command in a single line or use an equivalent continuation character: this SO question provides several alternatives for using multiline command in different windows versions, in cmd and Powershell, in summary, as pointed out as well by @TimRoberts in his comment, you can use the caret ^
command in cmd or the back tick ` in Powershell.
Upvotes: 1