minetest-tools / mcimport

71 stars 22 forks source link

KeyError: 'Blocks' when converting Minecraft "Witchcraft & Wizardry" #32

Open stefan123t opened 3 years ago

stefan123t commented 3 years ago

Hi, I am trying to convert the "Witchcraft & Wizardry" Minecraft project (Light version first) from the following website.

https://gumroad.com/l/floomap http://www.mediafire.com/file/xke143473zi4ytp/Witchcraft_and_Wizardry_-_Light.zip/file

Problem is I do get the following error during conversion:

$ python3 mcimport.py ../Witchcraft\ and\ Wizardry\ -\ Light/ ../witchcraft_and_wizardry/
Processed 0 / 182570 chunks, ETA ??:??:?? h:m:s
Processed 10 / 182570 chunks, ETA 0:00:32 h:m:s
...
Processed 1250 / 182570 chunks, ETA 0:01:05 h:m:s
chunkpos -353 yslice -1, chunkpos 127
Traceback (most recent call last):
  File "mcimport.py", line 107, in <module>
    mtmap.save()
  File "/home/sthieme/Downloads/mcimport/block.py", line 457, in save
    for block in self.blocks:
  File "/home/sthieme/Downloads/mcimport/block.py", line 441, in fromMCMapBlocksIterator
    for mcblock in mcmap.getBlocksIterator():
  File "/home/sthieme/Downloads/mcimport/block.py", line 63, in getBlocksIterator
    blocks = self.getChunk(chkx, chkz).blocks
  File "/home/sthieme/Downloads/mcimport/block.py", line 45, in getChunk
    return MCChunk(chkx, chkz, self.world_path, self.ext)
  File "/home/sthieme/Downloads/mcimport/block.py", line 92, in __init__
    self.blocks.append(MCBlock(raw_data, (chkx, chkz), section["Y"], True))
  File "/home/sthieme/Downloads/mcimport/block.py", line 110, in __init__
    self.from_section(section)
  File "/home/sthieme/Downloads/mcimport/block.py", line 176, in from_section
    self.blocks = self.reverse_X_axis(section["Blocks"])
KeyError: 'Blocks'

I changed the logging a bit and added the output of the chunkpos, yslice, chunkpos in block.py line 92 to give some more context. Dunno if this is helpful ?

BTW: I have had to change the shebang to #!/bin/bash in your mcimport.py otherwise the resulting get_mods.sh would not run under Linux Mint / Debian.

connervieira commented 3 years ago

I get the same error while converting any world.

mcimport.sh: 16: [: FirstLinuxWorld: unexpected operator
Traceback (most recent call last)::??:?? h:m:s
  File "mcimport.py", line 107, in <module>
    mtmap.save()
  File "/home/cvieira/Software/DownloadedSoftware/mcimport/block.py", line 455, in save
    for block in self.blocks:
  File "/home/cvieira/Software/DownloadedSoftware/mcimport/block.py", line 439, in fromMCMapBlocksIterator
    for mcblock in mcmap.getBlocksIterator():
  File "/home/cvieira/Software/DownloadedSoftware/mcimport/block.py", line 62, in getBlocksIterator
    blocks = self.getChunk(chkx, chkz).blocks
  File "/home/cvieira/Software/DownloadedSoftware/mcimport/block.py", line 45, in getChunk
    return MCChunk(chkx, chkz, self.world_path, self.ext)
  File "/home/cvieira/Software/DownloadedSoftware/mcimport/block.py", line 91, in __init__
    self.blocks.append(MCBlock(raw_data, (chkx, chkz), section["Y"], True))
  File "/home/cvieira/Software/DownloadedSoftware/mcimport/block.py", line 108, in __init__
    self.from_section(section)
  File "/home/cvieira/Software/DownloadedSoftware/mcimport/block.py", line 174, in from_section
    self.blocks = self.reverse_X_axis(section["Blocks"])

KeyError: 'Blocks'
mcimport.sh: 39: [: 1: unexpected operator
alienhunter3010 commented 2 years ago

Me too working on a Flat World built with WorldPainter.

OS: Ubuntu Linux