-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Encoding not supported #4496
Comments
What exactly are you doing when you get this error and what is the exact error you're seeing. Where do you get this error. From the
There's no such thing as a "version independent" bug (just bugs that span multiple versions). Are you getting it on 0.4.13? |
Hey, thought I replied to this earlier, sorry. I tested this with versions 0.4.4 through 0.4.13 and it occurs, so I thought it may be persistent, apologies for not being clear enough. The error in the logs is:
Hope this helps. Thanks! |
Was this error ever resolved? getting a similar error for the following: cat wordalg.json | ipfs dag put > word-task.hash |
Hey @ConorTighe1995, if you're trying to add data to IPFS (and are expecting a hash) you should use the |
Ah ok I was following the tutorial on computes.io: Thanks for the help! |
Oh, thanks for calling our attention to that. /cc @Mr0grog |
Hmmm, well, Computes isn’t our project, but I’m not sure those directions are wrong, either. Pretty much any JSON doc should be a valid IPLD doc and therefore valid input to I think we’d need to know what is in |
Thanks for the clarification! My bad @ConorTighe1995, it turns out you can use the @Mr0grog One more question, does the JSON need to have the same attributes as an IPLD node? I mean, {
"input": {
"dataset": 2
},
"taskDefinition": {
"runner": {
"type": "docker-json-runner",
"manifest": {
"*": {
"image": "computes/fibonacci-sum-split:latest"
}
}
},
"result": {
"action": "set",
"destination": {
"dataset": {
"init": "simple-task-results"
},
"path": "split/results"
}
}
},
"status": {
"init": "split-task-status"
}
}
I would expect field names like |
Sorry, one last question, what do you mean with IPLD doc? Any JSON file with the right format? |
This is whats giving me the error, I created a new VM and updated to the newest version of IPFS and computes, Im still getting the Error: selected encoding not supported error
|
Yes, as explained by @Mr0grog, the Replace those strings with any CID, e.g., That being said, these "encoding not supported" cryptic errors definetely need to be worked on, the main error (and what the user should see) is that this is an invalid CID, and only as a sub-error you can say why ( |
@schomatis, @ConorTighe1995: I've filed an issue here ipfs/go-ipld-cbor#36. Let's revert to the original issue and move all discussion there. |
Oops, I should have said “IPLD node” and “JSON doc” (where a JSON doc is the JSON serialization of an IPLD Node). Bad wording on my part.
Ah! So when we are talking about “IPLD” (as opposed to, say, UnixFS, which is a very particular subset of IPLD), absolutely any structure at all is acceptable (IPLD is really abstract). As long as we’re talking about JSON input to An aside on IPLD Note that the above stuff is different from a UnixFS node, which has a much more strict format ( The thing about IPLD that isn’t very clearly stated anywhere is that, format-wise, it’s really more of an abstract concept than a format. Absolutely any data is considered IPLD as long as it links to other bits of data using a cryptographic hash instead of something else, like a URL. (And if it has no links, then we can assume it just has 0 hash-based links, and it’s valid 😛) That’s why the IPLD Node interface in the Go implementation only has methods and no concrete values — it’s up to the actual struct for a given Node to do things like extracting a set of links or traversing a path to return a value, because a Node could be pretty much any stream of bytes. Also note that those links do not have to be CIDs, so long as we know enough to up-convert one to a CID. For example, if you know the IPLD node you’re working with is a Git object, you can treat all SHA1s in it as links and up-convert them to CIDs using 0x78 as the codec. Finally, it’s also good to keep in mind that the whole thing with I hope I’m not describing things everybody already knows here (and sorry if I am). It took me quite a lot of time and seemingly naïve questions to figure all the above out. (See also ipld/ipld#39 (comment)) |
Agreed, sorry for hijacking this one. |
@Varunram If you're still there, I'm not sure if that error message is related. That's an error message you'll see if a user asks for a non |
You're most definitely not. Help me write a quick and dirty IPLD intro for the (Sorry @Stebalien, last comment in this issue, I swear :)) |
I assume this is where the results will be saved to so should I not do an ipfs add of a results.txt file? thanks for the help |
Thanks @Stebalien, that makes sense, I shall close this issue now. |
Output From
ipfs version --all
The problem seems to be version independent (as it occurs on other versions too
Type:
Critical - System crash, application panic.
Description:
We host files on a server via ipfs and keep getting this error once every 2/3 days, requiring a restart.. Any help would be greatly appreciated. Thanks!
The text was updated successfully, but these errors were encountered: