Uploaded image for project: 'Motor'
  1. Motor
  2. MOTOR-12

Motor and PyMongo version compatibilities are confusing

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: 0.1
    • Fix Version/s: 0.1.1
    • Component/s: None
    • Labels:
      None
    • Environment:
    • # Replies:
      4
    • Last comment by Customer:
      true

      Description

      When trying to create a MotorReplicaSetClient, I get the following error:

      % python motor_sample.py
      Traceback (most recent call last):
      File "motor_sample.py", line 10, in <module>
      client = motor.MotorReplicaSetClient(",".join(servers), replicaSet="tsurumongoapi").open_sync()
      File "/Users/f/.venvs/motor/lib/python2.7/site-packages/motor/_init_.py", line 967, in open_sync
      super(MotorReplicaSetClient, self).open_sync()
      File "/Users/f/.venvs/motor/lib/python2.7/site-packages/motor/_init_.py", line 804, in open_sync
      for pool in self._get_pools():
      File "/Users/f/.venvs/motor/lib/python2.7/site-packages/motor/_init_.py", line 1004, in _get_pools
      self.delegate.MongoReplicaSetClient_members.values()]
      File "/Users/f/.venvs/motor/lib/python2.7/site-packages/pymongo/collection.py", line 1418, in _call_
      self.__name)
      TypeError: 'Collection' object is not callable. If you meant to call the 'values' method on a 'Database' object it is failing because no such method exists.

      I tried both formats: "mongodb://<server1>,<server2>,<server3>/" and "<server1>,<server2>,<server3>".

      It works nicely on pymongo.

        Attachments

          Activity

            People

            • Votes:
              2 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Days since reply:
                5 years, 25 weeks, 4 days ago
                Date of 1st Reply: