appwrite/sdk-for-python

๐Ÿ› Bug Report: Start With Python Tutorial fails

vvixi opened this issue ยท 1 comments

vvixi commented

๐Ÿ‘Ÿ Reproduction steps

Followed the steps in: https://appwrite.io/docs/quick-starts/python.
Ensured correct Project Id and API key.

๐Ÿ‘ Expected behavior

Expected my_app to launch, connect to API / db, and return "todo" items.

๐Ÿ‘Ž Actual Behavior

my_app.py example fails to run with:

(.venv) (base) dev@dv_one: python my_app.py
Traceback (most recent call last):
File "/home/user/Documents/appwrite/test/test_python/.venv/lib/python3.9/site-packages/appwrite/client.py", line 100, in call
response.raise_for_status()
File "/home/user/Documents/appwrite/test/test_python/.venv/lib/python3.9/site-packages/requests/models.py", line 1021, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 404 Client Error: Not Found for url: https://cloud.appwrite.io/v1/databases

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/user/Documents/appwrite/test/test_python/my_app.py", line 102, in
prepare_database()
File "/home/user/Documents/appwrite/test/test_python/my_app.py", line 21, in prepare_database
todoDatabase = databases.create(
File "/home/user/Documents/appwrite/test/test_python/.venv/lib/python3.9/site-packages/appwrite/services/databases.py", line 40, in create
return self.client.call('post', api_path, {
File "/home/user/Documents/appwrite/test/test_python/.venv/lib/python3.9/site-packages/appwrite/client.py", line 112, in call
raise AppwriteException(response.json()['message'], response.status_code, response.json().get('type'), response.json())
appwrite.exception.AppwriteException: Project with the requested ID could not be found. Please check the value of the X-Appwrite-Project header to ensure the correct project ID is being used.

๐ŸŽฒ Appwrite version

Version 0.10.x

๐Ÿ’ป Operating system

Linux

๐Ÿงฑ Your Environment

Kernel 6.1.55-1-MANJARO x86_64
Python 3.9.13
AMD Ryzen 7 1700X Eight-Core Processor

I can add more details upon request.

๐Ÿ‘€ Have you spent some time to check if this issue has been raised before?

  • I checked and didn't find similar issue

๐Ÿข Have you read the Code of Conduct?

Hi @vvixi, it looks like in this case the project was not set correctly, which caused the database to fail to create