-
Notifications
You must be signed in to change notification settings - Fork 74
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
Error while creating data: "struct.error: int too large to convert" #161
Comments
I just figured out why I was getting this problem and here it goes: data = int.from_bytes((data).to_bytes(8, 'big', signed=False), 'big', signed=True) I guess it's been a few months but if you see this hello! |
Using NBT 1.5.1 on MacOS 12.2.1 I have problems with creating NBT data. The main code is as follows:
where I get the following error:
The interesting thing is: Sometimes there is no problem! I run the EXACT same code, and I DO NOT GET ANY ERROR. In most cases I do get this error above. But in some cases, all is working fine.
Maybe that is something known? I will try to """reproduce""" this error. Not sure if that is possible at all.
I tried to create a "reproducible" example by writing the nbt data to a file. But either I get the exact same error when doing
or it works, and I can use the correct content of
test.nbt
. Which does not help debug anything...When I print out the value of
self.value
in the line I get the error, the values are always different. It is random!The text was updated successfully, but these errors were encountered: