0

I have created a project using azure-python serverless framework template. When I try to run locally: serverless offline, I get following error:

cannot load the goodbye function: the following parameters are declared in function.json but not in Python: {'res'}

If I modify manually function.json and replace name value "res" of parameter with $return, everything works. However, this file is regenerated by framework. How to define this parameter as $return in function.json?

1 Answer 1

2

You can modify your configuration file. If you specify the configuration file, you can modify the name from "res" to "$return" in it. If you didn't specify the configuration file, the configuration file should be serverless.yml|.yaml|.js|.json. Please refer to the screenshots below: enter image description here

enter image description here

Here provide two links(screenshot1, screenshot2) for the screenshots above(but I can't find serverless.yml for python sample, the second screenshot is for nodejs), you can also find more information about serverless in these two links.

Hope it helps~

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.