Skip to content

Error bitstrings #4

Description

@jpaulovecchi

Hello,
Please, could you help me with this issue:

[rocky@rocky ~]$ aiobfd 172.16.0.1 172.16.0.0
BFD Daemon fully configured.
Task exception was never retrieved
future: <Task finished name='Task-5' coro=<Control.rx_packets() done, defined at /home/rocky/.local/lib/python3.9/site-packages/aiobfd/control.py:44> exception=AttributeError("module 'bitstring' has no attribute 'BitString'")>
Traceback (most recent call last):
File "/home/rocky/.local/lib/python3.9/site-packages/aiobfd/control.py", line 50, in rx_packets
self.process_packet(packet, source)
File "/home/rocky/.local/lib/python3.9/site-packages/aiobfd/control.py", line 56, in process_packet
packet = Packet(data, source)
File "/home/rocky/.local/lib/python3.9/site-packages/aiobfd/packet.py", line 64, in init
packet = bitstring.BitString(data)
AttributeError: module 'bitstring' has no attribute 'BitString'

[rocky@rocky ~]$ python3
Python 3.9.21 (main, Jun 27 2025, 00:00:00)
[GCC 11.5.0 20240719 (Red Hat 11.5.0-5)] on linux
Type "help", "copyright", "credits" or "license" for more information.

import bitstring
data = b'\x00\x01\x02'
packet = bitstring.BitArray(data)
packet = bitstring.BitArray(data)
print(packet)
0x000102

Thanks,
Joao.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions