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
- Backup policies think im on free tier
Cant create more than one policy as im told to ugprade, when clicking upgrade im taken to the upgrade page which confirms im already on pro
- Cant get rid of "get started"
Not that important, but annoying. No matter what I do I cant get the "Get started" to go away, ive added a bunch of web platforms and its just stuck.
- TEAM INVITE
There is a problem with the team invitation. When a user invites other users, that time, the newly created email address they don't get the invite link and old ...