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

DocumentTooLarge error doesn't make sense

    • Type: Icon: Bug Bug
    • Resolution: Unresolved
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: Error Handling
    • Environment:
      raspberry pi (arm64)
      ubuntu 20.04
      python 3.6.9
      pymongo 3.11.0

      I'm getting this DocumentTooLarge error which doesn't make sense to me, as 92 bytes is less than the 16 mb limit:

      `DocumentTooLarge: BSON document too large (92 bytes) - the connected server supports BSON document sizes up to 16777216 bytes.`

       

      I'm new to mongodb so here is the code I'm using, where endpoint is the json object loaded with bson.json_util.loads():

      ``` python
      myclient = MongoClient("mongodb://steven:***@xanaxprincess.asuscomm.com:27017/")  
          db = myclient["yelp"]
          endpoint_str = str(endpoint)
          Collection = db[endpoint_str] 
          Collection.insert_many(endpoint) 
      ```

            Assignee:
            Unassigned Unassigned
            Reporter:
            stevenhurwitt@gmail.com Steven Hurwitt
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: