Hi, I started creating a simple function "Hello World!". The deployment works, but the execution fails. Another account created the function and it worked.
main.py
def main(request, response):
return response.json({
'message': 'Hello, World!'
})
Error: Traceback (most recent call last): File "/usr/local/server/src/server.py", line 163, in action output = await asyncio.wait_for(execute(context), timeout=safeTimeout) File "/usr/local/lib/python3.9/asyncio/tasks.py", line 479, in wait_for return fut.result() File "/usr/local/server/src/server.py", line 156, in execute output = userModule.main(context) TypeError: main() missing 1 required positional argument: 'response'
Are you using Appwrite cloud? If so, that's not what an Appwrite function looks like. Refer to the docs.
If you're self hosting, what version of Appwrite do you have?
Recommended threads
- Getting payload is too large response fr...
I'm encountering a 412 "Payload Too Large" error while trying to upload a 100MB file via Appwrite function to an external storage service api. Could you suggest...
- unexpected error occurred: HTTPConnectio...
Hi, do you have any idea why this error: ``` An unexpected error occurred: HTTPConnectionPool(host='bbl2xtf1', port=80): Max retries exceeded with url: /v1/stor...
- What is the entrypoint?
Hi, I have a python cloud function with dir structure Code snippet is ``` @app.post("/process") async def process_cv( user_id: str = Query(..., descripti...