Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mlogfilter --scan TypeError in Python 3.6.5 #618

Closed
stennie opened this issue May 4, 2018 · 1 comment
Closed

mlogfilter --scan TypeError in Python 3.6.5 #618

stennie opened this issue May 4, 2018 · 1 comment

Comments

@stennie
Copy link
Collaborator

stennie commented May 4, 2018

Expected behavior

mlogfilter --scan should match log lines with inefficient index usage.

Steps to reproduce the actual/current behavior

$ mlogfilter --scan mongod.log
Traceback (most recent call last):
  File "~/.pyenv/versions/3.6.5/bin/mlogfilter", line 11, in <module>
    load_entry_point('mtools', 'console_scripts', 'mlogfilter')()
  File "~/mtools/mtools/mlogfilter/mlogfilter.py", line 355, in main
    tool.run()
  File "~/mtools/mtools/mlogfilter/mlogfilter.py", line 341, in run
    if all([f.accept(logevent) for f in self.filters]):
  File "~/mtools/mtools/mlogfilter/mlogfilter.py", line 341, in <listcomp>
    if all([f.accept(logevent) for f in self.filters]):
  File "~/mtools/mtools/mlogfilter/filters/tablescan_filter.py", line 35, in accept
    ns = logevent.nscanned
  File "~/mtools/mtools/util/logevent.py", line 472, in nscanned
    self._extract_counters()
  File "~/mtools/mtools/util/logevent.py", line 605, in _extract_counters
    if self.operation:
  File "~/mtools/mtools/util/logevent.py", line 375, in operation
    self._extract_operation_and_namespace()
  File "~/mtools/mtools/util/logevent.py", line 400, in _extract_operation_and_namespace
    _ = self.thread
  File "~/mtools/mtools/util/logevent.py", line 338, in thread
    len(split_tokens) <= self.datetime_nextpos):
TypeError: '<=' not supported between instances of 'int' and 'NoneType'

Environment

Software Version
mtools 1.4.1
python 3.6.5
@stennie stennie added this to the 1.4.2 milestone May 4, 2018
kevinadi added a commit to kevinadi/mtools that referenced this issue Jun 27, 2018
stennie pushed a commit that referenced this issue Jun 27, 2018
@stennie
Copy link
Collaborator Author

stennie commented Jun 27, 2018

Fixed via #634

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant