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
- How to Avoid Double Requests in function...
I'm currently using Appwrite's `functions.createExecution` in my project. I want to avoid double requests when multiple actions (like searching or pagination) a...
- Project in AppWrite Cloud doesn't allow ...
I have a collection where the data can't be opened. When I check the functions, there are three instances of a function still running that can't be deleted. The...
- Get team fail in appwrite function
I try to get team of a user inside appwrite function, but i get this error: `AppwriteException: User (role: guests) missing scope (teams.read)` If i try on cl...