Problem with insert many using Motor

This is my code

This is error

But type(info)
3

Where is my mistake?

This is caused by incorrect usage of the insert_many() API. As per the documentation this method accepts an iterable of documents. Put your document inside of a list to get things to work, or if you want to only insert a single document, maybe consider using insert_one().

1 Like

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.