mrsarm / mongotail

Command line tool to log all MongoDB queries in a "tail"able way
https://pypi.org/project/mongotail/
GNU General Public License v3.0
192 stars 17 forks source link

Unknown operation "killcursors" #5

Closed alexandernst closed 9 years ago

alexandernst commented 9 years ago
2015-07-26 11:06:07.347 QUERY     [person] : {"type": {"$in": [2]}, "short_id": "3000000"}
2015-07-26 11:06:07.347 QUERY     [tag] : {}
2015-07-26 11:06:07.349 QUERY     [category] : {}
2015-07-26 11:06:07.351 QUERY     [size_chart] : {"deviser_id": "3000000", "type": 1}
2015-07-26 11:06:07.366 QUERY     [category] : {"$orderby": {"name.en-US": 1}, "$query": {"path": "/"}}
2015-07-26 11:06:08.799 QUERY     [size_chart] : {"type": 0, "categories": {"$in": ["fb3d0"]}}
2015-07-26 11:26:50.240 QUERY     [category] : {}
Mongotail EXCEPTION - Unknown operation "killcursors"
Dump: {"ns": "", "ts": ISODate("2015-07-26T11:26:50.240Z"), "op": "killcursors"}
Traceback (most recent call last):
  File "/usr/local/bin/mongotail", line 9, in <module>
    load_entry_point('mongotail==0.3.2', 'console_scripts', 'mongotail')()
  File "/usr/local/lib/python2.7/dist-packages/mongotail/mongotail.py", line 156, in main
    tail(client, db, args.n, args.follow)
  File "/usr/local/lib/python2.7/dist-packages/mongotail/mongotail.py", line 68, in tail
    print_obj(result)
  File "/usr/local/lib/python2.7/dist-packages/mongotail/out.py", line 129, in print_obj
    operation.upper().ljust(9), doc, query))
UnboundLocalError: local variable 'query' referenced before assignment
mrsarm commented 9 years ago

Sorry, I saw this issue today, maybe Github never notify me, or maybe I didn't see the notification in my inbox. I will check the error and the pull request in the incoming days.

mrsarm commented 9 years ago

The pull request #4 for this bug was accepted an merged, but with some fixes in the next commit.