Currently have this, but am getting an error saying 'Internal Runtime Error'
TypeScript
from appwrite.client import Client
from appwrite.services.databases import Databases
def main(req, res):
client = Client()
(client
.set_endpoint(endpoint)
.set_project(id)
.set_key(api key)
)
databases = Databases(client)
result = databases.list_collections(collection_id)
send = []
for i in result['collections']:
send.append(i['$id'])
return res.json({"collections": send})
TL;DR
The code appears to be a Python function to list all collections using the Appwrite service. The user is getting an 'Internal Runtime Error' while running the code. The error might be due to missing or incorrect values for endpoints, project ID, and API key. There is no mention of a solution in the thread.can you confirm that the appwrite service is up and running?
And btw, list_collections takes db Id as argument
Recommended threads
- After a GET request is passed to functio...
Create execution in the console can normally retrieve the get parameters。WHy?
- function subdomain ssl certs
The generated subdomain isn't getting a valid ssl cert, I was wondering if appwrite automatically generates one or uses a wildcard for *.functions.domain.com? ...
- Python Function Deployment hits General ...
The same deployment was working without issue yesterday and I have not hit any free tier limits yet. How do I figure out what's happening? Are you having issues...