NBT icon indicating copy to clipboard operation
NBT copied to clipboard

Opening servers.dat.

Open taitep opened this issue 2 years ago • 1 comments

I want to try adding some servers to the list using python, and seems this library would work. Testing it out does not go so well tho. I opened the .minecraft folder in a terminal, and in the python shell wrote the following:

>>> from nbt import nbt
>>> nbtfile = nbt.NBTFile('./servers.dat')

I get this error: gzip.BadGzipFile: Not a gzipped file (b'\n\x00') How do i fix this? Do i need to GZip it first?

taitep avatar Nov 02 '23 17:11 taitep

Same for

from nbt import nbt
og_servers_dat = "src_servers.dat"

with open(og_servers_dat, "rb") as input_file:
    nbtfile = nbt.NBTFile(fileobj=input_file)

gzip.BadGzipFile: Not a gzipped file (b'\n\x00')

lynrayy avatar Sep 06 '24 22:09 lynrayy