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.Recommended threads
- User ID case sensitivity
I see that through REST (and SDK as well), getting a user is not case sensitive. And even though documentation does not clearly state that it is, the wording "V...
- Any way to temporarily bypass the email ...
Hey guys, any way to bypass the email verification to use the accounts again? i need to recover some projects that due to recent changes have been stopped, and ...
- How to use Sites on selfhosted appwrite
whenever I try to create a site even with template it says 404 nginx error