
I have a problem with async appwrite function. I use context in my main function and i call function from query_by_location_id file. However, i got the error. Does anyone have solution for the async function solution? Thank you.

Hello, Errors! 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 154, in execute output = await userModule.main(context) File "/usr/local/server/src/function/main.py", line 51, in main return context.res.json( File "/usr/local/server/src/server.py", line 25, in json return self.send(json.dumps(obj, separators=(',', ':')), statusCode, headers) File "/usr/local/lib/python3.9/json/init.py", line 234, in dumps return cls( File "/usr/local/lib/python3.9/json/encoder.py", line 199, in encode chunks = self.iterencode(o, _one_shot=True) File "/usr/local/lib/python3.9/json/encoder.py", line 257, in iterencode return _iterencode(o, 0) File "/usr/local/lib/python3.9/json/encoder.py", line 179, in default raise TypeError(f'Object of type {o.class.name} ' TypeError: Object of type coroutine is not JSON serializable

You're trying to return something that isn't JSON serializable

Ya. That list_document()

Or rather, query_by_location_id(location_id)
Recommended threads
- Invalid credentials after migration
Hi everyone! After migrating our self-hosted Appwrite 1.3.1 to another server (staging, so a different domain), we are now getting 'Invalid credentials' when ...
- implement caching
It it possible to cache response for few minutes? I dont want to create function or implement a whole reverse server just to cache it in somewhere ?
- Invalid redirect url
I keep getting invalid redirect url in Nextjs when i try to use google or github authentication
