RyanOriginal post
Rank 2: Process
so basically, I need to get a document from appwrite database. as u can see in the picture, there are many documents, with their IDs. the DB ID is env_vars and collection ID is key-value-pairs. I try to access ENVHUB_API_KEY and it gives 404 saying document not found. Why?
my code:
Python
from appwrite.services.databases import Databasesfrom appwrite.client import Clientclient = Client()key = Databases(client).get_document("env_vars", "key-value-pair", "ENVHUB_API_KEY")Summary
Developers are experiencing an issue where they are trying to retrieve a document from the Appwrite database but are receiving a 404 error stating that the document cannot be found. They have checked and confirmed that the database ID and collection ID are correct. They are using Python to access the document.
Solution:
It appears that there is a typo in the code. The collection ID is listed as "key-value-pairs" but is referenced as "key-value-pair" in the code. The correct code should be:
```py
key = Databases(client).get_document("env_vars", "key-value-pairs", "ENV