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
- Function connected custom domain error: ...
My domain is served through Cloudflare. Domain is now connected with the appwrite function. But when accessing the domain, I get the below error. Any suggestion...
- Error | general_unknown
I have built a website using Appwrite Cloud as backend, and also using sites for deployment. My website is live but sometimes it shows Appwrite's Error general_...
- functions domain error
I cannot set up the domain for function I’m trying to add the domain api.example.com I can only use Cloudflare as the DNS provider because my domain provider do...