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
- Relation Question
How do I create a relation from table y to an others x.$id. in my example I have a users table where I use Appwrites unique User IDs and I want other tables fo...
- Unknown attribute type: varchar / text
Since the `string` type is deprecated I tried using `varchar` and `text` in some newer tables, but when running `appwrite pull tables && appwrite types ./src/li...
- I'm experiencing a critical bug on Appwr...
Hey <@870607367597850624> team / support π I'm experiencing a critical bug on Appwrite Cloud that's blocking my production Flutter app. I've already filed GitH...