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

_repr_helper of MongoClient mishandles socketTimeoutMS=None

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Minor - P4 Minor - P4
    • 3.3
    • Affects Version/s: 3.1, 3.2
    • Component/s: None
    • Labels:
      None

      Hello,

      According to the docs, one can set/leave socketTimeoutMS as None in order to not have a timeout. However, when you try to log/print any database/collection/client having this, you'll get a TypeError.

      The code here https://github.com/mongodb/mongo-python-driver/blob/master/pymongo/mongo_client.py#L842-L843 tries to format the socketTimeoutMS value, which is None, and can't be multiplied by 1000.

      Best,
      Mihnea

            Assignee:
            bernie@mongodb.com Bernie Hackett
            Reporter:
            mihneadb Mihnea Dobrescu Balaur
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: