gdmc_http_client_python icon indicating copy to clipboard operation
gdmc_http_client_python copied to clipboard

Issue in worldLoader.py: unable to read file buffer

Open HSTEHSTEHSTE opened this issue 3 years ago • 2 comments

Line 57 in worldLoader.py is unable to read file buffer:

Error: Internal server error: java.util.ConcurrentModificationException Traceback (most recent call last): File "c:\Users\HSTE\GMDC_2022\examples\simple_village.py", line 64, in <module> WORLDSLICE = WL.WorldSlice(STARTX, STARTZ, File "C:\Users\HSTE\AppData\Local\Programs\Python\Python39\lib\site-packages\gdpc\worldLoader.py", line 58, in __init__ self.nbtfile = nbt.nbt.NBTFile(buffer=file_like) File "C:\Users\HSTE\AppData\Local\Programs\Python\Python39\lib\site-packages\nbt\nbt.py", line 641, in __init__ self.parse_file() File "C:\Users\HSTE\AppData\Local\Programs\Python\Python39\lib\site-packages\nbt\nbt.py", line 675, in parse_file raise MalformedFileError( nbt.nbt.MalformedFileError: First record is not a Compound Tag

Adding a print statement just before the NBT file load solves the issue (albeit in unsatisfactory manner).

Could some shed some light on what might be causing the issue? Thanks!

HSTEHSTEHSTE avatar May 18 '22 14:05 HSTEHSTEHSTE

Sorry, hadn't seen your comment there! My best guess is that the chunk simply wasn't loaded, so I'm not sure why adding a print should have any effect on that whatsoever. This is a sort-of known issue (see #59), but more information on what exactly causes the issue to appear is always welcome!

Flashing-Blinkenlights avatar Jul 14 '22 16:07 Flashing-Blinkenlights

Moved to https://github.com/avdstaaij/gdpc/issues/43

avdstaaij avatar Sep 24 '22 17:09 avdstaaij