Skip to content
Back

Import "appwrite.exceptions" could not be resolved

  • 1
  • Functions
ASHQKING
1 May, 2025, 17:02

Import "appwrite.exceptions" could not be resolved I tried using many versions of appwrite but this error still occuring. Please help me to fix it.

TL;DR
Error occurs importing "appwrite.exceptions". Instead of `appwrite.exceptions`, try using `appwrite.exception`. Make sure to check the appwrite package version being used and runtime.
ASHQKING
1 May, 2025, 17:03

@Support

Kenny
1 May, 2025, 17:07

What appwrite package are you using, what runtime is the function, what's the code look like? This is very vague.

ASHQKING
1 May, 2025, 17:35

`from appwrite.client import Client from appwrite.services.databases import Databases from appwrite.exceptions import AppwriteException # This is causing the issue

Appwrite client initialization

try: appwrite_client = Client() appwrite_client.set_endpoint(APPWRITE_ENDPOINT)
\ .set_project(APPWRITE_PROJECT_ID)
\ .set_key(APPWRITE_API_KEY) databases = Databases(appwrite_client) except Exception as e: print(f"Failed to initialize Appwrite client: {e}")`

Python 3.13.3 Name: appwrite Version: 9.0.3

ASHQKING
1 May, 2025, 17:37

I also tried other versions but still have same errors

Kenny
1 May, 2025, 17:41

instead of appwrite.exceptions could you try just appwrite.exception

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