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

mplotqueries --overlay example not working #818

Closed
vgrippa-zz opened this issue Aug 5, 2020 · 1 comment
Closed

mplotqueries --overlay example not working #818

vgrippa-zz opened this issue Aug 5, 2020 · 1 comment
Assignees
Milestone

Comments

@vgrippa-zz
Copy link

vgrippa-zz commented Aug 5, 2020

The example provided on the page is not working:

grep "oplog.rs" mongod.log | mplotqueries --type durline --overlay
mplotqueries mongod.log --group operation
vgrippa-mac:temp vgrippa$ grep "oplog.rs" mongod.log | mplotqueries --type durline --overlay
Error: cannot serialize '_io.TextIOWrapper' object
vgrippa-mac:temp vgrippa$ mplotqueries mongod.log --group operation
parsing mongod.log [========================                ] 58.8 %

Expected behavior

Provide overlay functionality.

Actual/current behavior

An error is thrown and overlay does not happen.

Steps to reproduce the actual/current behavior

Environment

vgrippa-mac:temp vgrippa$ mplotqueries --version
mtools version 1.6.4 || Python 3.7.3 (default, Mar 6 2020, 22:34:30) [Clang
11.0.3 (clang-1103.0.32.29)]

MongoDB v3.6.8

MacOS Catalina 10.15.6

@stennie stennie added this to the 1.7.0 milestone Sep 7, 2020
@stennie stennie added bug and removed question labels Oct 12, 2020
@stennie stennie self-assigned this Oct 12, 2020
stennie added a commit to stennie/mtools that referenced this issue Oct 12, 2020
 - add __getstate__ to avoid serialising LogFile TextIOWrapper object
 - set pickle protocol version to 4 for compatibility (instead of -1/highest)
 - remove unnecessary __future__ imports
@stennie
Copy link
Collaborator

stennie commented Oct 12, 2020

Hi @vgrippa,

Thanks for the bug report and apologies for the delay in investigation. As it turns out, the --overlay feature was not working in Python 3 with piped input.

I've committed a fix for the next release of mtools (1.7.0).

Regards,
Stennie

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

2 participants