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

schedule_refresh AttributeError in AutoReconnect handling in replica_set_client

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 2.5.1
    • Affects Version/s: 2.5
    • Component/s: None
    • None
    • Environment:
      pymongo 2.5

      After a network error, if i try to use a previously opened db connection, an AttributeError exception was raised.

      ```
      File "/home/work/pyenv/revolution/local/lib/python2.7/site-packages/pymongo/collection.py", line 596, in find_one
      for result in self.find(spec_or_id, *args, **kwargs).limit(-1):
      File "/home/work/pyenv/revolution/local/lib/python2.7/site-packages/pymongo/cursor.py", line 814, in next
      if len(self.__data) or self._refresh():
      File "/home/work/pyenv/revolution/local/lib/python2.7/site-packages/pymongo/cursor.py", line 763, in _refresh
      self.__uuid_subtype))
      File "/home/work/pyenv/revolution/local/lib/python2.7/site-packages/pymongo/cursor.py", line 700, in __send_message
      **kwargs)
      File "/home/work/pyenv/revolution/local/lib/python2.7/site-packages/pymongo/mongo_replica_set_client.py", line 1301, in _send_message_with_response
      response = self.__try_read(member, msg, **kwargs)
      File "/home/work/pyenv/revolution/local/lib/python2.7/site-packages/pymongo/mongo_replica_set_client.py", line 1214, in __try_read
      self.__schedule_refresh()
      File "/home/work/pyenv/revolution/local/lib/python2.7/site-packages/pymongo/mongo_replica_set_client.py", line 839, in __schedule_refresh
      self.__monitor.schedule_refresh()
      AttributeError: 'NoneType' object has no attribute 'schedule_refresh'
      ```

            Assignee:
            bernie@mongodb.com Bernie Hackett
            Reporter:
            bigeagle Justin Wong
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: