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
- self-hosted auth: /v1/account 404 on saf...
Project created in React/Next.js, Appwrite version 1.6.0. Authentication works in all browsers except Safari (ios), where an attempt to connect to {endpoint}/v1...
- delete document problems
i don't know what's going on but i get an attribute "tournamentid" not found in the collection when i try to delet the document... but this is just the document...
- Update User Error
```ts const { users, databases } = await createAdminClient(); const session = await getLoggedInUser(); const user = await users.get(session.$id); if (!use...