Skip to content

KeyError in aiobtdht/routing_table/bucket.py #8

@zrthstr

Description

@zrthstr

Any guess what may cause this error in aiobtdht?

Task exception was never retrieved
future: <Task finished name='Task-756289' coro=<DHT._add_or_update_node() done, defined at /home/home_path/dht_poc/venv/lib/python3.11/site-packages/aiobtdht/dht.py:211> exception=KeyError((<aiobtdht.routing_table.node.Node object at 0x7f2f6aaadb50>, <aiobtdht.routing_table.node_stat.NodeStat object at 0x7f2f68361a90>))>
Traceback (most recent call last):
  File "/home/home_path/dht_poc/venv/lib/python3.11/site-packages/aiobtdht/dht.py", line 213, in _add_or_update_node
    self._add_node(id_, addr)
  File "/home/home_path/dht_poc/venv/lib/python3.11/site-packages/aiobtdht/dht.py", line 134, in _add_node
    self.routing_table.add(node_id, addr)
  File "/home/home_path/dht_poc/venv/lib/python3.11/site-packages/aiobtdht/routing_table/__init__.py", line 13, in add
    added = bucket.add(Node(id_, addr))
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/home_path/dht_poc/venv/lib/python3.11/site-packages/aiobtdht/routing_table/bucket.py", line 31, in add
    self._nodes.pop(it)
KeyError: (<aiobtdht.routing_table.node.Node object at 0x7f2f6aaadb50>, <aiobtdht.routing_table.node_stat.NodeStat object at 0x7f2f68361a90>)

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