
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
- OAuth2 Error: invalid success param url ...
Hi everyone! I'm trying to implement Google OAuth2 login in a React Native app (using the Android simulator) with Appwrite Cloud, and I'm getting the following ...
- Trying to set up a new appwrite project
we have used the folder structure as follow Functions /function-name /src/index,js This is our entrypoint and git confugre settings When I try to run ...
- My Cloud functions domain has changed.
I want to know why the domain name of my Cloud functions has changed? I used to use appwrite.global but it suddenly became appwrite.run these days. I want to us...
