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

Big blocks error #332

Open
Moogamouth opened this issue May 1, 2024 · 0 comments
Open

Big blocks error #332

Moogamouth opened this issue May 1, 2024 · 0 comments

Comments

@Moogamouth
Copy link

Moogamouth commented May 1, 2024

Error: ipfshttpclient.exceptions.ErrorResponse: produced block is over 1MiB: big blocks can't be exchanged with other peers. consider using UnixFS for automatic chunking of bigger files, or pass --allow-big-block to override
Snippets of my code:

from ipfshttpclient import connect
client = connect()
new_block = client.object.new("unixfs-dir")
block = new_block
item = client.add(path, wrap_with_directory=True)
block_hash = block["Hash"]
block = client.object.patch.add_link(block_hash, id, item[len(item) - 1]["Hash"])

The error is coming from the final line. It only occurs when item is larger than 1MiB.

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

No branches or pull requests

1 participant