[DOCS-6894] Comment on: "primer/insert.txt" Created: 03/Jan/16  Updated: 24/Feb/16  Resolved: 11/Jan/16

Status: Closed
Project: Documentation
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Docs Collector User (Inactive) Assignee: Allison Reinheimer Moore
Resolution: Cannot Reproduce Votes: 0
Labels: collector-298ba4e7
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

OSX el Capitan. python 2.7

Location: https://docs.mongodb.org/getting-started/python/insert/
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.106 Safari/537.36
Referrer: https://docs.mongodb.org/getting-started/python/client/
Screen Resolution: 1920 x 1200
repo: docs
source: insert


Participants:
Days since reply: 8 years, 5 weeks, 2 days ago

 Description   

the insert_one function returns the following error upon copy/pasting:

TypeError: 'Collection' object is not callable. If you meant to call the 'insert_one' method on a 'Collection' object it is failing because no such method exists.



 Comments   
Comment by Allison Reinheimer Moore [ 11/Jan/16 ]

I'm not running into the error quoted when copy-pasting the code block.

insert_one was added in PyMongo 3.0 – perhaps you are using an earlier version of PyMongo that does not include insert_one?

Generated at Thu Feb 08 07:53:11 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.