Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unsupported daemon version '0.12.2' (not in range: 0.4.3 \u2264 � < 0.5.0) #313

Open
jay0x5 opened this issue Apr 20, 2022 · 16 comments
Open

Comments

@jay0x5
Copy link

jay0x5 commented Apr 20, 2022

Hi i am new to IPFS and Python and while trying out to store data on ipfs i ran into some errors, please help me

here is my code:

import ipfshttpclient
client = ipfshttpclient.connect('/ip4/127.0.0.1/tcp/8080)  # Connects to: /dns/localhost/tcp/5001/http
res = client.add('test.txt')

Here is the error:
ipfshttpclient.exceptions.VersionMismatch: Unsupported daemon version '0.8.0' (not in range: 0.4.18 \u2264 � < 0.5.0)

go-ipfs version: 0.12.2
Repo version: 12
Platform: Windows10

@jay0x5 jay0x5 changed the title ConnectionRefusedError: [WinError 10061] No connection could be made because the target machine actively refused it Unsupported daemon version '0.12.2' (not in range: 0.4.3 \u2264 � < 0.5.0) Apr 20, 2022
@BobBorges
Copy link

Same!

@jay0x5
Copy link
Author

jay0x5 commented May 13, 2022

@BobBorges i solved this by writing my code in javascript and using Js IPFS lib
looks like python lib is abandoned

@BobBorges
Copy link

@jay0x5 I've seen similar comments in other places too – problem is, I just hate javascript. I went into my package files and changed the VERSION_MAXIMUM variable to "0.13.0", line 19 in client/__init__.py. After that it allows me to connect and add(). I haven't fully explored the consequence of this hack (I'm still trying to wrap my head around IPFS in general) – but I suppose if it would be so simple someone else would have done this already.

@jay0x5
Copy link
Author

jay0x5 commented May 13, 2022

@BobBorges Nice hack! i wish i knew it earlier :(
Please keep me updated here or you may contact me on email: contactjay0x5@gmail.com
would love to see how it goes!

@willcharlton
Copy link

Same. Is this repo abandoned then?

@jay0x5
Copy link
Author

jay0x5 commented May 18, 2022

@willcharlton yep! its abandoned :(

@Bird-NZ
Copy link

Bird-NZ commented May 24, 2022

I'm getting a similar issue with trying to connect using python
"VersionMismatch: Unsupported daemon version '0.11.0' (not in range: 0.4.22 ≤ … < 0.7.0)"
If this is abandoned how else can I connect to IPSF via something like infura and interact with IPFS? Any pointers from here people for a bit of IPFS action via python?

@willcharlton
Copy link

@Bird-NZ - this looks promising: https://gitlab.com/cipres/aioipfs

@vaishnavvp
Copy link

vaishnavvp commented Jun 23, 2022

@BobBorges I've seen similar comments in other places too – problem is, I just hate javascript. I went into my package files and changed the VERSION_MAXIMUM variable to "0.13.0", line 19 in client/__init__.py. After that it allows me to connect and add(). I haven't fully explored the consequence of this hack (I'm still trying to wrap my head around IPFS in general) – but I suppose if it would be so simple someone else would have done this already.

not working for me any other solution ipfshttpclient.exceptions.VersionMismatch: Unsupported daemon version '0.13.0' (not in range: 0.4.18 ≤ … < 0.5.0)

@crushr3sist
Copy link
Contributor

For anyone wondering, this is abandoned, I have been told by a "higher up". Use subprocess and interact with the software through that, there's no excuse to use the older version just to make it work with python. However, it doesn't discredit the daemon.

@veqtor
Copy link

veqtor commented Aug 3, 2022

It's absolutely absurd that ipfs doesn't have a working client in python

@superswan
Copy link

@jay0x5 I've seen similar comments in other places too – problem is, I just hate javascript. I went into my package files and changed the VERSION_MAXIMUM variable to "0.13.0", line 19 in client/__init__.py. After that it allows me to connect and add(). I haven't fully explored the consequence of this hack (I'm still trying to wrap my head around IPFS in general) – but I suppose if it would be so simple someone else would have done this already.

This solution has worked for me. I was successfully able to connect, add a new file and access it from a public gateway. Thanks. Is this project no longer maintained?

@willcharlton
Copy link

@jay0x5 I've seen similar comments in other places too – problem is, I just hate javascript. I went into my package files and changed the VERSION_MAXIMUM variable to "0.13.0", line 19 in client/__init__.py. After that it allows me to connect and add(). I haven't fully explored the consequence of this hack (I'm still trying to wrap my head around IPFS in general) – but I suppose if it would be so simple someone else would have done this already.

This solution has worked for me. I was successfully able to connect, add a new file and access it from a public gateway. Thanks. Is this project no longer maintained?

It appears that it is abandoned. Has anyone on this thread evaluated https://gitlab.com/cipres/aioipfs?

@hemangjoshi37a
Copy link

Hi everyone,

I'm a contributor to the py-ipfs-http-client project and I've noticed this thread.

Firstly, I'm sorry to hear that many of you are having issues with daemon version mismatches. I understand this is frustrating and it's certainly not the experience we want for our users.

The issue you're experiencing is due to the client library being out of sync with the newer versions of the IPFS daemon. This is a known issue and we are currently working on a solution to support the latest versions of the daemon.

In the meantime, as some of you already suggested, you can manually change the VERSION_MAXIMUM variable in the client/__init__.py file to match the version of your daemon. However, please note that this is a temporary solution and we don't recommend it for production use as it might lead to unexpected errors and behavior.

@willcharlton, thanks for pointing out the aioipfs library. That's indeed a viable alternative, although it might not have all the features of the py-ipfs-http-client.

@Wizock, interacting with the IPFS daemon directly via subprocesses is also an option, but that could be more complex and error-prone.

@sudama011
Copy link

@jay0x5 I've seen similar comments in other places too – problem is, I just hate javascript. I went into my package files and changed the VERSION_MAXIMUM variable to "0.13.0", line 19 in client/__init__.py. After that it allows me to connect and add(). I haven't fully explored the consequence of this hack (I'm still trying to wrap my head around IPFS in general) – but I suppose if it would be so simple someone else would have done this already.

This worked for me. Thanks

@pinnaculum
Copy link

pinnaculum commented Apr 11, 2024

Hello, i'm the author of aioipfs, which at the moment supports the RPC API of kubo v0.27.0. I think there will always be a need for a synchronous python ipfs client library like ipfshttpclient for small scripts and existing programs that don't use asyncio and need to interact with IPFS.

I remember that with py-ipfs-http-client, instead of using .connect(), you can instantiate a Client directly without doing the version detection ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests