# Ipfshttpclient (python) connection error

**URL:** <https://discuss.ipfs.tech/t/ipfshttpclient-python-connection-error/8067>\
**Category:** Help\
**Tags:** go-ipfs\
**Created:** [May 26, 2020, 8:56am UTC](https://discuss.ipfs.tech/t/ipfshttpclient-python-connection-error/8067 "2020-05-26T08:56:44Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![kingofmidas](https://avatars.discourse-cdn.com/v4/letter/k/8e7dd6/32.png) [@kingofmidas](https://discuss.ipfs.tech/u/kingofmidas)\
**Post date:** [May 26, 2020, 8:56am UTC](https://discuss.ipfs.tech/t/ipfshttpclient-python-connection-error/8067/1 "2020-05-26T08:56:44Z")

</div>

I have ipfshttpclient version 0.4.12 and ipfs demon version 0.4.23. Ipfs and python are in containers:  
ipfs:  
image: ipfs/go-ipfs:v0.4.23  
ports:  
- “4001:4001”  
- “5001:5001”  
- “8080:8080”  
networks:  
- knox-net  
networks:  
knox-net:  
driver: bridge

I try connect method: `client = ipfshttpclient.connect("/dns/ipfs/tcp/5001")`  
but get error

 ![Screenshot from 2020-05-26 11-24-42](https://us1.discourse-cdn.com/flex020/uploads/ipfs1/original/2X/4/439886c975aa355a2840a7474f048a3781c4553a.png)

---

<div class="post-metadata">

**Author:** ![hector](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/hector/32/178_2.png) [@hector](https://discuss.ipfs.tech/u/hector)\
**Post date:** [May 26, 2020, 4:54pm UTC](https://discuss.ipfs.tech/t/ipfshttpclient-python-connection-error/8067/2 "2020-05-26T16:54:22Z")

</div>

Your API is not listening on a public interface. Change to 0.0.0.0 in the config.
