tntech-ngin / ndn-hydra

ndn-hydra: A Python-coded NDN distributed repository with five focused attributes: resiliency, scalability, usability, efficiency, and security.
Apache License 2.0
2 stars 1 forks source link

NoneType on store message #24

Closed GportDev closed 1 month ago

GportDev commented 1 month ago
ndn-hydra-repo -rp /hydra -n node2
Read handle: listening to /hydra/fetch
Read handle: listening to /hydra/node/node2/fetch
Query handle: listening to /hydra/query
Query handle: listening to /hydra/node/node2/query
Insert handle: subscribing to /hydra/insert
Insert handle: subscribing to /hydra/delete
Subscribing to topic: /hydra/insert
Subscribing to topic: /hydra/delete

[ACT][FETCH]*   fil=/insert-test.txt;pcks=128;fetch_path=/client/upload/insert-test.txt

Fetching data: 100%|████████████| 128/128 [00:00<00:00, 1933.28block/s]

[ACT][FETCHED]* pcks=128;duration=0.11154580116271973

[MSG][STORE]*   nam=/node2;fil=/insert-test.txt
[MSG][STORE]    nam=/node3;fil=/insert-test.txt
[MSG][STORE]    nam=/node4;fil=/test.txt

[CMD][QUERY]    query received: files

Task exception was never retrieved
future: <Task finished name='Task-325' coro=<NDNApp._receive() done, defined at /home/ubuntu/.local/lib/python3.8/site-packages/ndn/app.py:70> exception=TypeError("'NoneType' object is not subscriptable")>
Traceback (most recent call last):
  File "/home/ubuntu/.local/lib/python3.8/site-packages/ndn/app.py", line 105, in _receive
    await self._on_interest(name, param, app_param, sig, raw_packet=data)
  File "/home/ubuntu/.local/lib/python3.8/site-packages/ndn/app.py", line 514, in _on_interest
    node.callback(name, param, app_param, **kwargs)
  File "/home/ubuntu/gabriel/ndn-hydra/ndn_hydra/repo/handles/read_handle.py", line 79, in _on_interest
    best_id = self._best_id_for_file(file_name)
  File "/home/ubuntu/gabriel/ndn-hydra/ndn_hydra/repo/handles/read_handle.py", line 130, in _best_id_for_file
    on_list = file_info["stores"]
TypeError: 'NoneType' object is not subscriptable

[ACT][RENEW]*   nam=/node3
[ACT][RENEW]*   nam=/node4
[ACT][RENEW]*   nam=/node2
sankalpatimilsina12 commented 1 month ago

Addressed in the #28 PR.