
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
- How to reduce cold start times for cloud...
Is there anything I can do to prevent slow responses? How long does it take for a function to enter a "cold state"?
- Migration error 'Invalid Runtime: dart-3...
I try to migrate my project from a self hosted Appwrite 1.6.2 to another self hosted server (Appwrite 1.7.4). When it comes to migrate the functions i get the e...
- Create a common utils file for all funct...
Hello everyone, I am trying to create a common utils file where I can store js functions that are common to many functions such as get a user, get a team, get ...
