Back

Python invalid query

  • 0
  • Self Hosted
whataboutno13
20 May, 2024, 08:33

Hi there, In my python function I want to search for an user by email. This is the code I wrote and the imports used.

TypeScript
from appwrite.client import Client
from appwrite.services.users import Users
from appwrite.services.storage import Storage
from appwrite.query import Query

[...]
found_users = users.list([Query.equal("email", mail)])

Now when I run this code I get the following error.

TypeScript
appwrite.exception.AppwriteException: Invalid `queries` param: Invalid query: Invalid query

So far I've primarily written dart functions, so I am a little bit confused what needs to be done differently in python. What am I doing wrong here?

TL;DR
Issue: Developer is encountering an error "Invalid query" in Python when trying to search for a user by email using Appwrite. Solution: The issue might be with the way the query is constructed. The correct syntax for querying in Python might be slightly different. Try modifying the query construction part in the code to ensure it follows the correct syntax for Python.
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