teto / pymptcpanalyzer

Tool to help analyze mptcp pcaps
21 stars 5 forks source link

EXCEPTION of type 'TypeError' occurred with message: 'plot() missing 1 required positional argument: 'rawdf' #28

Open rezakb opened 5 years ago

rezakb commented 5 years ago

Output of mptcpanalyzer -dDEBUG (or -dTRACE ):


    Problem when calling plotter.run
We passed the following arguments:
{}
{'plot_type': 'dss', 'out': None, 'display': False, 'title': None, 'primary': False, 'styles': [], 'dack': False, '__statement__': Statement(args='dss', raw='plot dss', command='plot', arg_list=['dss'], multiline_command='', terminator='', suffix='', pipe_to='', output='', output_to='')}
Traceback (most recent call last):
  File "/X/X/Library/Python/3.7/lib/python/site-packages/cmd2/cmd2.py", line 1753, in onecmd_plus_hooks
    stop = self.onecmd(statement, add_to_history=add_to_history)
  File "/X/X/Library/Python/3.7/lib/python/site-packages/cmd2/cmd2.py", line 2148, in onecmd
    stop = func(statement)
  File "/X/X/Library/Python/3.7/lib/python/site-packages/cmd2/cmd2.py", line 214, in cmd_wrapper
    return func(cmd2_app, args, unknown)
  File "/X/X/Library/Python/3.7/lib/python/site-packages/mptcpanalyzer/cli.py", line 1163, in do_plot
    raise e
  File "/X/X/Library/Python/3.7/lib/python/site-packages/mptcpanalyzer/cli.py", line 1157, in do_plot
    result = plotter.run(**dataframes, **dargs)
  File "/X/X/Library/Python/3.7/lib/python/site-packages/mptcpanalyzer/plot.py", line 268, in run
    fig = self.plot(*pargs, styles=styles, **kwargs)
TypeError: plot() missing 1 required positional argument: 'rawdf'
EXCEPTION of type 'TypeError' occurred with message: 'plot() missing 1 required positional argument: 'rawdf''``

# how to reproduce
run "plot dss"
Link to the pcap (if possible/relevant):
teto commented 5 years ago

Thanks for reporting. It's a plot I haven't updated. Will try to do soon and add it to the tests. Meanwhile you can plot dss/dsn via plot mptcp_attr examples/client_2_redundant.pcapng 0 dsn --display with autocompletion, you can see available fields, for instance: dsn dsnraw64 dss_dsn dss_length dss_rawack dss_ssn. NB: Seems like the legend doesn't show the destination (client/server), gotta fix that too :/

rezakb commented 5 years ago

Thank you. I will try mptcp_attr.

On Aug 10, 2019, at 1:43 PM, Matthieu Coudron notifications@github.com wrote:

Thanks for reporting. It's a plot I haven't updated. Will try to do soon and add it to the tests. Meanwhile you can plot dss/dsn via plot mptcp_attr examples/client_2_redundant.pcapng 0 dsn --display with autocompletion, you can see available fields, for instance: dsn dsnraw64 dss_dsn dss_length dss_rawack dss_ssn . NB: Seems like the legend doesn't show the destination (client/server), gotta fix that too :/

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/teto/mptcpanalyzer/issues/28?email_source=notifications&email_token=AM3WEUR4PGYQQQIEADLSZZ3QD343VA5CNFSM4IKYQZQ2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD4ASADI#issuecomment-520167437, or mute the thread https://github.com/notifications/unsubscribe-auth/AM3WEUV3I6M6BD3YQS76GLDQD343VANCNFSM4IKYQZQQ.

teto commented 5 years ago

so this prove more complex than I had anticipated because I hadn't updated that code in a long time. I have almost completed the update but I still have an issue: the plot is supposed to draw arrows from origin (sending time, data sequence number ) with size (0, dss.length) but matplotlib's autoscale doesn't work with arrows: https://github.com/matplotlib/matplotlib/pull/13788

Apparently it's going to be fixed by september so I will release a fix with next matplotlib in september.