Skip to content
Back

AttributeError: 'Context' object has no attribute 'get'

  • 0
  • Functions
  • Cloud
Camka
7 Jan, 2026, 19:03

I'm getting an error executing my function. I'm not able to replicate this locally since I have to use a mock context. Is there a way to debug this kind of error?

Traceback (most recent call last): File "/usr/local/server/src/server.py", line 166, in handler return await action(logger, request) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/server/src/server.py", line 125, in action output["body"] = output.get("body", "") ^^^^^^^^^^ AttributeError: 'Context' object has no attribute 'get'

TL;DR
Developers are facing an 'AttributeError' with a 'Context' object. They are unable to replicate it locally due to using a mock context. The error occurs because the 'get' attribute is missing from the 'Context' object. To debug this, check the context object being passed to ensure it has the 'get' method and handle the attribute appropriately.
Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more