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

AttributeError raised when use_greenlets=True is specified without gevent

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Minor - P4 Minor - P4
    • 2.6.3
    • Affects Version/s: None
    • Component/s: None
    • None

      Seems like self.sockets needs to be set before doing this check.

      >>> import pymongo
      >>> c = pymongo.MongoClient(use_greenlets=True)
      Traceback (most recent call last):
        File "<stdin>", line 1, in ?
        File "pymongo/mongo_client.py", line 331, in __init__
          wait_queue_multiple=self.__wait_queue_multiple)
        File "pymongo/pool.py", line 145, in __init__
          raise ConfigurationError(
      pymongo.errors.ConfigurationError: The Gevent module is not available. Install the gevent package from PyPI.
      >>> 
      Exception exceptions.AttributeError: "Pool instance has no attribute 'sockets'" in <bound method Pool.__del__ of <pymongo.pool.Pool instance at 0x722878>> ignored
      

            Assignee:
            jesse@mongodb.com A. Jesse Jiryu Davis
            Reporter:
            bernie@mongodb.com Bernie Hackett
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: