Uploaded image for project: 'Python Driver'
  1. Python Driver
  2. PYTHON-1098

AttributeError: 'RawBSONDocument' object has no attribute 'copy'

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 3.3
    • Affects Version/s: None
    • Component/s: None
    • None

      >>> from bson.raw_bson import RawBSONDocument
      >>> from bson.codec_options import CodecOptions
      >>> import pymongo
      >>> client = pymongo.MongoClient()
      >>> opts = CodecOptions(document_class=RawBSONDocument)
      >>> collection = client.get_database('test', codec_options=opts).collection
      >>> collection.update_one({'_id': 1}, {'$set': {'x': 1}})
      Traceback (most recent call last):
        File "<stdin>", line 1, in <module>
        File "/Users/emptysquare/.virtualenvs/c-driver/lib/python2.7/site-packages/pymongo/collection.py", line 835, in update_one
          bypass_doc_val=bypass_document_validation)
        File "/Users/emptysquare/.virtualenvs/c-driver/lib/python2.7/site-packages/pymongo/collection.py", line 709, in _update
          codec_options=self.codec_options).copy()
      AttributeError: 'RawBSONDocument' object has no attribute 'copy'
      

            Assignee:
            luke.lovett Luke Lovett
            Reporter:
            jesse@mongodb.com A. Jesse Jiryu Davis
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: