tart / motop

"Top" clone for MongoDB
67 stars 24 forks source link

error on replset #15

Closed dingyaguang117 closed 10 years ago

dingyaguang117 commented 10 years ago

when I connect to a secondary server of a replset, error ocurs:

Traceback (most recent call last):
  File "/usr/local/bin/motop", line 5, in 
    pkg_resources.run_script('motop==4.0', 'motop')
  File "/usr/local/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg/pkg_resources.py", line 489, in run_script
  File "/usr/local/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg/pkg_resources.py", line 1214, in run_script
  File "/usr/local/lib/python2.7/site-packages/motop-4.0-py2.7.egg/EGG-INFO/scripts/motop", line 4, in 
    import pkg_resources
  File "/usr/local/lib/python2.7/site-packages/motop-4.0-py2.7.egg/libmotop/motop.py", line 95, in run
  File "/usr/local/lib/python2.7/site-packages/motop-4.0-py2.7.egg/libmotop/queryscreen.py", line 308, in action
  File "/usr/local/lib/python2.7/site-packages/motop-4.0-py2.7.egg/libmotop/queryscreen.py", line 130, in reset
  File "/usr/local/lib/python2.7/site-packages/motop-4.0-py2.7.egg/libmotop/server.py", line 103, in replicaSetMembers
NameError: global name 'values' is not defined

when I connect to a master server of a replset, error ocurs:

Traceback (most recent call last):
  File "/usr/local/bin/motop", line 5, in 
    pkg_resources.run_script('motop==4.0', 'motop')
  File "/usr/local/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg/pkg_resources.py", line 489, in run_script
  File "/usr/local/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg/pkg_resources.py", line 1214, in run_script
  File "/usr/local/lib/python2.7/site-packages/motop-4.0-py2.7.egg/EGG-INFO/scripts/motop", line 4, in 
    import pkg_resources
  File "/usr/local/lib/python2.7/site-packages/motop-4.0-py2.7.egg/libmotop/motop.py", line 95, in run
  File "/usr/local/lib/python2.7/site-packages/motop-4.0-py2.7.egg/libmotop/queryscreen.py", line 308, in action
  File "/usr/local/lib/python2.7/site-packages/motop-4.0-py2.7.egg/libmotop/queryscreen.py", line 100, in reset
AttributeError: 'NoneType' object has no attribute 'as_datetime'
hasegeli commented 10 years ago

Thank you for reporting. I fixed it on the master. Can you test it before I upload it to PyPi?

dingyaguang117 commented 10 years ago

@hasegeli tested, run correctly now, thx

hasegeli commented 10 years ago

I uploaded version 4.1 to PyPi.