The function execution failes even though it can be runned properly
- 0
- Databases
- Functions
- Users
- Cloud
I created a function in Python language to create a new user in Appwrite. After i run it in vs code, the new user is created in appwrite.
The problem is when I execute this function, it failes. <:appwritepeepo:902865250427215882>
Does anybody know the solution?
P.S I am using Appwrite Cloud
This is a deployed function? Or you're running it in your local machine?
Yes, this is the deployed function.
š
For deployed functions you'll need to use Appwrite starter structure. For example: https://github.com/appwrite/functions-starter/blob/main/python-3.8/src/index.py
The reason is that your function should declare a main function with the same signature in the above example.
If you want the best way to create functions in Appwrite is to user Appwrite cli Like you can see here. https://appwrite.io/docs/functions#gettingStarted
Thank you for your help. I will correct my code
I tried another function to create a document. The new document was created but yet the function execution failed.
What error you getting?
In vs terminal or in appwrite server?
InsecureRequestWarning: Unverified HTTPS request is being made to host 'cloud.appwrite.io'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#ssl-warnings
In appwrite there are no errors
In Appwrite server
So this is only in your local machine?
yes
My coworkers are facing the same issue
What happened when you change it to False?
.set_self_signed(False)
The error about https request won't show anymore
But it keeps failing
Keep failing how? You get any logs?
Can you wrap your code in a try/except and share the Exception.
Response: Invalid request payload
logs: Failed to parse request payload: Expecting property name enclosed in double quotes: line 2 column 5 (char 6)
Print the payload, and check that it's a correct JSON
Recommended threads
- Couldnt not do appwrite push tables
Not sure why i am not able to create my tables
- DeploymentStatus enum value `canceled` m...
Hey, Sorry if it has been reported already, I found an issue using the Dart SDK where the `canceled` enum value is missing from `DeploymentStatus`. This causes...
- Frequent 500 Internal Server Errors - Pr...
PROJECT ID: 6951f2xxxxx1ee9e750a REGION: Singapore (sgp.cloud.appwrite.io) PLAN: Pro Our production application experiences **500 Internal Server Errors** mult...