nwdiag packet diagram issues

71 views
Skip to first unread message

hla

unread,
Jun 29, 2019, 9:20:43 AM6/29/19
to blockdiag-discuss
Hi,

I would like to create packet diagrams using nwdiag. I installed nwdiag version 1.04. running 
$ sudo pip3 install nwdiag
on my Ubuntu system. I created a test file example.diag:

packetdiag {
   0-7: Source Port
   8-15: Destination Port
}

and tried to generate a packed diagram from it, running
$ nwdiag --debug example.diag

However, I am getting the following error message:

Traceback (most recent call last):
  File "/usr/local/lib/python3.6/dist-packages/nwdiag/parser.py", line 289, in parse_string
    tree = parse(tokenize(string))
  File "/usr/local/lib/python3.6/dist-packages/nwdiag/parser.py", line 80, in tokenize
    return [x for x in t(string) if x.type not in useless]
  File "/usr/local/lib/python3.6/dist-packages/nwdiag/parser.py", line 80, in <listcomp>
    return [x for x in t(string) if x.type not in useless]
  File "/usr/local/lib/python3.6/dist-packages/funcparserlib/lexer.py", line 107, in f
    t = match_specs(compiled, str, i, (line, pos))
  File "/usr/local/lib/python3.6/dist-packages/funcparserlib/lexer.py", line 100, in match_specs
    raise LexerError((line, pos + 1), errline)
funcparserlib.lexer.LexerError: cannot tokenize data: 2,5: "   0-7: Source Port"

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.6/dist-packages/blockdiag/utils/bootstrap.py", line 53, in run
    parsed = self.parse_diagram()
  File "/usr/local/lib/python3.6/dist-packages/blockdiag/utils/bootstrap.py", line 87, in parse_diagram
    return self.module.parser.parse_string(self.code)
  File "/usr/local/lib/python3.6/dist-packages/nwdiag/parser.py", line 293, in parse_string
    raise ParseException(message)
nwdiag.parser.ParseException: Got unexpected token at line 2 column 5

has anyone encouter a similar issue and knows how to fix this?

Best,
Oliver

Reply all
Reply to author
Forward
0 new messages