Closed khssnv closed 6 years ago
Can't reproduce. Another try with printing ipfs.add output to log finished fine.
You are free to reopen if you are reproduce it in the future.
I just got this error again in the same environment. We should check ipfsapi add realization behavior or runtime check what it returns kinda like:
add_output = self.ipfs.add(result_file)
msg.result = add_output['Hash'] if type(add_output) == dict else add_output[0]['Hash']
Could you provide ipfs returned values in both cases?
IPFS API unfolds original provider response from a list to dict if it contains just one item. But if an error occurs while provider proceeding request it returns a list with two item (expected dict and a message dict) even if we add one file. You can see the returned values below. I've open an issue in IPFS API repository, maybe they know a better place for error messages.
No errors (returns dict as expected):
>>> ipfsapi.connect('http://127.0.0.1', 5001).add('./myfile')
{'Name': 'myfile', 'Hash': 'QmbFMke1KXqnYyBBWxB74N4c5SBnJMVAiMNRcGu6x1AwQH', 'Size': '6'}
With a error (returns a list with error message):
>>> ipfsapi.connect('http://127.0.0.1', 5001).add('./myfile')
[{'Name': 'myfile', 'Hash': 'QmbFMke1KXqnYyBBWxB74N4c5SBnJMVAiMNRcGu6x1AwQH', 'Size': '6'},
{'Message': 'cannot store pin state: write /var/lib/ipfs/datastore/000014.log: no space left on device', 'Code': 0, 'Type': 'error'}]
Please consider my PR to prevent liability node crashes in a such situation: https://github.com/airalab/robonomics_comm/pull/12
Is stored with error file available on your node? Or we need to store file again?
If you mean a file I try to add, yes it becomes available by IPFS after adding it. No need to add it again. The only trouble is to get its hash in a proper way.
Ok, nice, thanks for your work!
Hi. I use liability node with default launch parameters. On result publishing I've got an exception you may find on a screenshot above. Whats wrong?
ipfs version 0.4.15 NixOS 18.09.git.a50a99a