Capone
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. Arth
can you confirm that the appwrite service is up and running?
Arth
And btw, list_collections takes db Id as argument
Recommended threads
- Project in AppWrite Cloud doesn't allow ...
I have a collection where the data can't be opened. When I check the functions, there are three instances of a function still running that can't be deleted. The...
- Get team fail in appwrite function
I try to get team of a user inside appwrite function, but i get this error: `AppwriteException: User (role: guests) missing scope (teams.read)` If i try on cl...
- Function in Node.JS to monitor events ar...
Hello everyone. I'm creating my first Node.JS function, but I don't have much experience with node and javascript. I'm trying to create a function, that monito...