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
- Unable to create Sites or Functions with...
Heya, I was looking at the appwrite documentation for Sites API with the server api: https://appwrite.io/docs/references/cloud/server-nodejs/sites I can’t fin...
- Triggers and call function in function p...
Hello, Today we are experiencing several issues with Appwrite Cloud. Functions triggered by events, or functions called from another function, are taking an e...
- Functions executed by events does not ap...
Hello, Running self-hosted Appwrite version 1.9.0 (with console 7.8.26). When functions are triggered by an event (eg. databases.\*tables.\*.rows.\*.create) doe...