ipfs-shipyard/py-ipfs-http-client

swarm.connect() ipfshttpclient.exceptions.ErrorResponse: failed to parse multiaddr "": empty multiaddr

avatar-lavventura opened this issue · 2 comments

  • version: ipfshttpclient==0.8.0a2
  • ipfs version 0.9.0

When I try to connect into a ipfs node I keep having following error: *** ipfshttpclient.exceptions.ErrorResponse: failed to parse multiaddr "": empty multiaddr

$ client.swarm.connect("/ip4/10.132.0.4/tcp/4001/p2p/12D...c8N")
*** ipfshttpclient.exceptions.ErrorResponse: failed to parse multiaddr "": empty multiaddr

What may be the main cause of this error? How can I resolve it?

You don't want swarm connect here. Your client should be connecting via http. Swarm is for peers.

What you want is something like /ip4/127.0.0.1/tcp/5001/http

I want to connect into peers though. Shouldn't be correct way to do it?

from ipfs's README:

DESCRIPTION

  'ipfs swarm connect' opens a new direct connection to a peer address.
  The address format is an IPFS multiaddr:
  ipfs swarm connect /ip4/104.131.131.82/tcp/4001/p2p/QmaCpDMGvV2BGHeYERUEnRQAwe3N8SzbUtfsmvsqQLuvuJ