Back

module 'appwrite.query' has no attribute 'select'

  • 0
  • Databases
  • REST API
cryptobitez
4 Dec, 2024, 18:43

In python im running this line: from appwrite import query

database = Databases(client).list_documents(database_id= 'xxx', collection_id= 'xxx', queries= query.select(['thread_content' , 'USER_ID', '$createdAt', 'likes', 'dislikes', 'Money_earnt'])).orderDesc('$createdAt')

I get an error : module 'appwrite.query' has no attribute 'select' I'm using the next js python fast api template so i'm not sure how to check the python dependancies as everything runs on node terminal. But this is an issue. I've seen other posts suggesting to update the appwrite package. Not sure how to do that using next js with python backend. It says atm in the pacakge.json file that i have appwrite ^14.0.0 downloaded- (on the python or node js side i dont know). Help please

TL;DR
When using the 'query' module from Appwrite in Python, you're getting an error that says 'module 'appwrite.query' has no attribute 'select'. To resolve this, update the Appwrite package to version 14.0.0 or higher. Since you're using a Python backend with the Next.js framework, check and update the dependencies in the 'package.json' file.
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