#[SOLVED] Invalid Query error in python

11 messages · Page 1 of 1 (latest)

old jetty
#

Hi I am still a bit new but am trying to add a query to the list_documents function by keep getting the error appwrite.exception.AppwriteException: Invalid query: {"method":"isNull","attribute":"timestamp_analyzed"}

My code:

from appwrite.query import Query

    images = databases.list_documents(
        database_id = 'DatabaseID', 
        collection_id = 'CollectionID',
        queries = [
            Query.is_null("timestamp_analyzed")
        ]  
    )

The function works fine when I dont pass a query. Any ideas on what im doing wrong?

noble grail
old jetty
#

I am using version 5.0.2 i believe

#

Output of pip show appwrite

Name: appwrite
Version: 5.0.2
Summary: Appwrite is an open-source self-hosted backend server that abstract and simplify complex and repetitive development tasks behind a very simple REST API
Home-page: https://appwrite.io/support
Author: Appwrite Team
Author-email: [email protected]
License: BSD-3-Clause
Location: c:\users\<user>\appdata\local\programs\python\python310\lib\site-packages
Requires: requests
Required-by:
noble grail
old jetty
#

Thanks ill give that a try

#

is V5 still in beta?

noble grail
#

The version 5.x.x is intended to work only with Appwrite 1.5.x and superior versions
Currently that version is available only in self-hosted and cloud doesn't has been upgraded yet.
Once it's upgraded, you can use that SDK version

old jetty
#

Thanks, changing to version 4.1.0 worked!

#

also thanks for the explanation

noble grail