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

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

Open
stefan123t opened this issue Nov 8, 2020 · 2 comments
Open

Comments

@stefan123t
Copy link

stefan123t commented Nov 8, 2020

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
Copy link

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
Copy link

Me too working on a Flat World built with WorldPainter.

OS: Ubuntu Linux

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

3 participants