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
- I can't UNPAUSE my project with the free...
I received an email notifying me that my project had been paused due to inactivity, and the email included a link to "Restore project." However, that button red...
- Error trying to deploy functions from CL...
✗ Error • on-auth-create (6a00b2ab000c9ce2949b) • Server Error ✗ Error: No functions were pushed. Prject ID: 69ffe0270033a4ac420a
- Intermittent Deploy and Execution Errors...
Project: project-fra-658e2f5f4ba30df91177 Function ID: 69bde006001c56757f49 **Several execution errors with:** Timed out waiting for runtime.\nError Code: 400...