larsks / python-ftn

Another stab at creating a suite of Fidonet utilities in python.
https://github.com/larsks/python-ftn/wiki
GNU General Public License v3.0
18 stars 6 forks source link

error on scan pkt #7

Closed ftoledo closed 4 years ago

ftoledo commented 4 years ago

Hi i found this great tools! thanks! i try to read a pkt file and have this error:

ragnarok@ragnarok:/tmp$ ftn-scanpkt -t 5E38BFCA.PKT 
======================================================================
5E38BFCA.PKT:  4:902/25 -> 4:90/1 @ 2020-02-04 00:50:17
======================================================================

ragnarok@ragnarok:/tmp$ ftn-scanpkt -m 5E38BFCA.PKT 
======================================================================
5E38BFCA.PKT:  4:902/25 -> 4:90/1 @ 2020-02-04 00:50:17
======================================================================

[000]
From: Fernando Toledo @ 902/25
To: Manuel Adorni @ 90/1
Date: 04 Nov 19  23:40:29
Subject: Probando...
Flags:

Traceback (most recent call last):
  File "/usr/local/bin/ftn-scanpkt", line 9, in <module>
    load_entry_point('python-ftn==1.0.0', 'console_scripts', 'ftn-scanpkt')()
  File "/usr/local/lib/python2.7/dist-packages/fidonet/app.py", line 14, in run
    return app.main()
  File "/usr/local/lib/python2.7/dist-packages/fidonet/app.py", line 40, in main
    self.handle_args(args)
  File "/usr/local/lib/python2.7/dist-packages/fidonet/apps/scanpkt.py", line 20, in handle_args
    self.for_each_arg(self.scan_pkt, args)
  File "/usr/local/lib/python2.7/dist-packages/fidonet/app.py", line 118, in for_each_arg
    func(msgbits, msgfile, ctx=ctx)
  File "/usr/local/lib/python2.7/dist-packages/fidonet/apps/scanpkt.py", line 35, in scan_pkt
    msg = fidonet.MessageFactory(pkt.messages)
  File "/usr/local/lib/python2.7/dist-packages/fidonet/messagefactory.py", line 18, in MessageFactory
    msg = packedmessage.MessageParser.parse(bits)
  File "/usr/local/lib/python2.7/dist-packages/fidonet/bitparser.py", line 101, in parse
    except bitstring.errors.ReadError:
AttributeError: 'module' object has no attribute 'errors'

any idea?

ftoledo commented 4 years ago

packet file:

5E38BFCA.PKT.ZIP

larsks commented 4 years ago

I haven't touched this code in almost 10 years :). It looks like the bitstring module may have changed since I wrote this code. If I were writing this now I would probably use something like kaitai struct, but I'm not really working with FTN networks anymore.