ipfshttpclient.exceptions.StatusError: HTTPError: 405 Client Error: Method Not Allowed for url: http+ip4://127.0.0.1:5001/api/v0/version?stream-channels=true
See original GitHub issueipfs version 0.5.1 ipfshttpclient-0.4.13.2
Ipfs is already running on the background using (nohup ipfs daemon &
). Afterwards I tried to obtain already connected ipfs’s client.
$ ipfs config Addresses
{
"API": "/ip4/127.0.0.1/tcp/5001",
"Announce": [],
"Gateway": "/ip4/127.0.0.1/tcp/8080",
"NoAnnounce": [],
"Swarm": [
"/ip4/0.0.0.0/tcp/4001",
"/ip6/::/tcp/4001"
]
}
import ipfshttpclient
client = ipfshttpclient.connect('/ip4/127.0.0.1/tcp/5001/http')
=> What may be the reason of this error? How could I fix it?
Error log:
❯ ./ipfs_daemon.py
[2020-06-04 02:48:12 lib.py:314 - is_process_on()] IPFS is already running on the background
Traceback (most recent call last):
File "/home/alper/venv/lib/python3.7/site-packages/ipfshttpclient/http.py", line 266, in _do_raise_for_status
response.raise_for_status()
File "/home/alper/venv/lib/python3.7/site-packages/requests/models.py", line 941, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 405 Client Error: Method Not Allowed for url: http+ip4://127.0.0.1:5001/api/v0/version?stream-channels=true
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "./ipfs_daemon.py", line 30, in <module>
client = ipfshttpclient.connect('/ip4/127.0.0.1/tcp/5001/http')
File "/home/alper/venv/lib/python3.7/site-packages/ipfshttpclient/client/__init__.py", line 101, in connect
version_str = client.version()["Version"]
File "/home/alper/venv/lib/python3.7/site-packages/ipfshttpclient/client/base.py", line 15, in wrapper
result = func(*args, **kwargs)
File "/home/alper/venv/lib/python3.7/site-packages/ipfshttpclient/client/miscellaneous.py", line 204, in version
return self._client.request('/version', decoder='json', **kwargs)
File "/home/alper/venv/lib/python3.7/site-packages/ipfshttpclient/http.py", line 51, in wrapper
return func(self, *args, **merged)
File "/home/alper/venv/lib/python3.7/site-packages/ipfshttpclient/http.py", line 386, in request
username, password, data, timeout)
File "/home/alper/venv/lib/python3.7/site-packages/ipfshttpclient/http.py", line 307, in _request
self._do_raise_for_status(res)
File "/home/alper/venv/lib/python3.7/site-packages/ipfshttpclient/http.py", line 286, in _do_raise_for_status
six.raise_from(exceptions.StatusError(error), error)
File "<string>", line 3, in raise_from
ipfshttpclient.exceptions.StatusError: HTTPError: 405 Client Error: Method Not Allowed for url: http+ip4://127.0.0.1:5001/api/v0/version?stream-channels=true
Issue Analytics
- State:
- Created 3 years ago
- Reactions:3
- Comments:16 (5 by maintainers)
Top Results From Across the Web
Help - IPFS Forums
ipfshttpclient.exceptions.StatusError: HTTPError: 405 Client Error: Method Not Allowed for url: http+ip4://127.0.0.1:5001/api/v0/version?stream-channels=true.
Read more >Python get data from IPFS error HTTPError: 405 Client Error
It's show error like this. HTTPError: 405 Client Error: Method Not Allowed for url: http://127.0.0.1 ...
Read more >How to Fix the HTTP 405 Method Not Allowed Error - Kinsta®
A 404 tells you that the requested URL couldn't be found or that it was entered incorrectly. A 405 error message, on the...
Read more >Failed to connect to API + 405 not allowed : r/ipfs - Reddit
Hi guys, I've got a problem with my current IPFS node since this morning. I'm hosting the node on AWS, the hosting machine...
Read more >POST request to IPFS gateway returns 405 - Infura Community
POST /ipfs/ HTTP/1.1 > Host: ipfs.infura.io > User-Agent: curl/7.60.0 > Accept: */* > < HTTP/1.1 405 Method Not Allowed < Date: Sat, ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Should be fixed in 0.6.0
go-ipfs daemon version and ipfshttpclient version should be same e.g v0.8.0 or v0.6.0.