Skip to content
Back

Persistent TypeError: object dict can't be used in 'await' expression with Appwrite Python

  • 0
  • Databases
  • Storage
  • REST API
AMEK
7 Jul, 2025, 15:50

Subject: Persistent TypeError: object dict can't be used in 'await' expression with Appwrite Python SDK 11.0.0 (Databases Service)

Hello everyone,

I'm developing a FastAPI backend that uses YOLO for object detection, Google Gemini for image analysis, and Appwrite for database storage. I'm encountering a very persistent and unusual error when trying to interact with the Appwrite Databases service.

Problem: When my async function calls any of the db methods (e.g., await db.list_documents(), await db.update_document(), await db.create_document()), I consistently receive the following error: TypeError: object dict can't be used in 'await' expression

The error specifically occurs on the await keyword for these db method calls, implying that the Appwrite SDK method is returning a plain Python dictionary instead of an awaitable coroutine object.

My Setup:

Operating System: Windows

Python Version: 3.11.x (specifically 3.11.9, confirmed active in venv)

Appwrite Python SDK Version: appwrite==11.0.0

httpx Version: I've tried multiple versions, including httpx==0.23.0 (currently installed), 0.24.1, and the latest default, with no change in this specific error.

FastAPI: fastapi, uvicorn

What's Working:

The FastAPI server starts successfully.

YOLO model loads and performs detections.

Google Gemini API integrates and generates reports correctly (gemini-1.5-flash).

Annotated images and text reports are successfully saved locally to a tmp directory.

What's Failing:

Any interaction with appwrite.services.databases.Databases methods that require await.

TL;DR
Developers encountering "Persistent TypeError: object dict can't be used in 'await' expression" with Appwrite Python SDK 11.0.0 when using Appwrite Databases service. Error occurs due to Appwrite SDK method returning a dictionary instead of an awaitable coroutine. Solution involves using synchronous calls instead of await.
D5
7 Jul, 2025, 15:51

Persistent TypeError: object dict can't be used in 'await' expression with Appwrite Python

AMEK
7 Jul, 2025, 15:53

can some one help me out with this

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more