Back

Python Function doesn't return nested json data

  • 0
  • Self Hosted
  • Functions
antonio84
9 Aug, 2023, 15:16

Hello I want to send json data on python function response but after succesfully deployed the function, when I execute it, I get "Internal server error". This is the code: return res.json({ 'message': json.dumps({"error": str(e), "data": "custom data"}), 'payload': payload, 'secretKey': secretKey, 'randomNumber': randomNumber, 'trigger': trigger }, 500) What's wrong with that?

TL;DR
The user is encountering an internal server error when trying to send JSON data in the Python function response. They are seeking assistance on what might be causing the issue. They have provided their code snippet and shared links to similar issues on GitHub. They also mention the possibility of sharing function logs for further assistance. It is unclear if a solution is provided in the thread.
Tessa
10 Aug, 2023, 02:05

is this similar to your issue? https://github.com/appwrite/appwrite/issues/2940 There was a few reports related to using python on here

Also can you share function logs maybe the support team can better assist

antonio84
12 Aug, 2023, 09:37

yes

Drake
12 Aug, 2023, 14:21

What's your full code?

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