Huge thanks to our Platinum Members Endace and LiveAction,
and our Silver Member Veeam, for supporting the Wireshark Foundation and project.

Wireshark-dev: [Wireshark-dev] ASN dissector (re)generation: TypeError: unorderable types: slic

From: Jakub Zawadzki <darkjames-ws@xxxxxxxxxxxx>
Date: Tue, 3 Dec 2013 23:03:52 +0100
Hi,

I hit this problem when trying to regenerating few ASN dissectors:

/usr/bin/python ../../tools/asn2wrs.py \
        -E -b -L \
        -p dap \
        -c ./dap.cnf \
        -D . \
         dap.asn DirectoryAccessProtocol.asn 
ASN.1 to Wireshark dissector compiler
Traceback (most recent call last):
  File "../../tools/asn2wrs.py", line 8028, in <module>
    eth_main()
  File "../../tools/asn2wrs.py", line 7959, in eth_main
    ast.extend(yacc.parse(f.read(), lexer=lexer, debug=pd))
  File "/tmp/wireshark/tools/yacc.py", line 265, in parse
    return self.parseopt_notrack(input,lexer,debug,tracking,tokenfunc)
  File "/tmp/wireshark/tools/yacc.py", line 971, in parseopt_notrack
    p.callable(pslice)
  File "../../tools/asn2wrs.py", line 7201, in p_cls_syntax_3
    t[0] = { get_class_fieled(' '.join(t[1:-1])) : t[-1:][0] }
  File "/tmp/wireshark/tools/yacc.py", line 198, in __getitem__
    if n >= 0: return self.slice[n].value
TypeError: unorderable types: slice() >= int()

After changing PYTHON= to python2 it works OK, so problem is with python 3.X (3.2.5?)

Kuba.