Issue with reading from the find query cursor

I just need some help here because I am so lost…
i have my code here
client = pymongo.MongoClient(“mongodb+srv://”)

db = client.GettingStarted

x = db.warnings.find({"user"})

for info in x:
    await ctx.send(info)
print (x)

and whenever i try to find my data stored it gets turned into a cursor object which is fine. But whenever i do the for info in x: no information comes out of it, and I know the data is forsure in there… Is there anything visibally wrong?

Hello @starlord_N_A, welcome to the MongoDB Community forum!

In case you are trying to print the find query’s output from the cursor, the following will work:

for info in x:

Note that Python programming has indentation rules, and the for-in syntax is as shown in the above code. Also, see this example: Querying for more than one document using PyMongo .