From 57820a49d452cb919f76df142aabd642ceff1fb9 Mon Sep 17 00:00:00 2001 From: Philip Kovac Date: Sun, 4 Mar 2012 12:22:20 -0500 Subject: [PATCH] fix for worlds converted by jeb_'s anvil converter Fixes Issue #629 --- overviewer_core/world.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/overviewer_core/world.py b/overviewer_core/world.py index c4354b8..7575701 100644 --- a/overviewer_core/world.py +++ b/overviewer_core/world.py @@ -296,8 +296,12 @@ class RegionSet(object): chunk_data = level # Turn the Biomes array into a 16x16 numpy array - biomes = numpy.frombuffer(chunk_data['Biomes'], dtype=numpy.uint8) - biomes = biomes.reshape((16,16)) + try: + biomes = numpy.frombuffer(chunk_data['Biomes'], dtype=numpy.uint8) + biomes = biomes.reshape((16,16)) + except KeyError: + # worlds converted by Jeb's program may be missing the Biomes key + biomes = numpy.zeros((16, 16), dtype=numpy.uint8) chunk_data['Biomes'] = biomes for section in chunk_data['Sections']: