
hi, I used python to write function. I tested basic code, everything is okay. build completed. But, when I use 'from appwrite.client import Client' , I see Internal Runtime error. on Appwrite panel. What is the problem?

could you share the code you're using in the function?

@safwan sure

import random from appwrite.client import Client
def main(req, res): payload = req.payload or 'No payload provided. Add custom data when executing function.'
secretKey = req.variables.get(
'SECRET_KEY',
'SECRET_KEY variable not found. You can set it in Function settings.'
)
randomNumber = random.random()
return res.json({
'message': 'Hello from Appwrite!',
'payload': payload,
'secretKey': secretKey,
'randomNumber': randomNumber
})

When I add 'from appwrite.client import Client', it will be problem

did you add the appwrite package as a dependency to your function?
Recommended threads
- coolify/appwrite ssl functions
(Sorry for m english, i'm french) Hello, i tried for 3 days to generate ssl for domain function like idfunction.appwrite.christophe-le-goff.dev. I install appwr...
- Error on updating Functions build comman...
I try to update the "build command" of one of my functions using the Console UI, but I always get an unknown server error (see screenshots). I can change other ...
- deleteDocments is not a function
Hello. At the bottom of my project's console, in the footer, I have `Version 1.7.4`. However, when I run my server side function, I am told that `databases.dele...
