flatironinstitute / kachery-p2p

Peer-to-peer content-addressable file sharing using kachery
4 stars 4 forks source link

keyError: 'kacheryStorageDir' while unpacking probe result #27

Closed jihyunbak closed 3 years ago

jihyunbak commented 3 years ago

Using the latest version as of Mar 16th:

>>> import kachery_p2p as kp
>>> kp_channel = kp.get_channels()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/jhbak/proj/kachery-p2p/kachery_p2p/main.py", line 70, in get_channels
    return _get_channels()
  File "/home/jhbak/proj/kachery-p2p/kachery_p2p/_core2.py", line 23, in _get_channels
    x = _probe_daemon(api_port=api_port)
  File "/home/jhbak/proj/kachery-p2p/kachery_p2p/_daemon_connection.py", line 57, in _probe_daemon
    res = _probe_result(x) if x is not None else None
  File "/home/jhbak/proj/kachery-p2p/kachery_p2p/_daemon_connection.py", line 28, in __init__
    self.kachery_storage_dir = cast(Union[str, None], x['kacheryStorageDir'] or None)
KeyError: 'kacheryStorageDir'
jihyunbak commented 3 years ago

In case this is relevant: I am using a daemon started by another user.

magland commented 3 years ago

Make sure the other user is using the most recent version as well (I forgot to mention that)

jihyunbak commented 3 years ago

That worked. Thanks!