diff --git a/minetestmapper-expertmm.py b/minetestmapper-expertmm.py index 0b7e765..46a944c 100644 --- a/minetestmapper-expertmm.py +++ b/minetestmapper-expertmm.py @@ -375,7 +375,7 @@ if os.path.exists(path + "sectors"): zlist.append(z) if len(xlist) == 0 or len(zlist) == 0: - print("At this location, data does not exist.") + print("At this location data does not exist.") sys.exit(1) # Get rid of doubles diff --git a/minetestmapper-numpy.py b/minetestmapper-numpy.py index 12a305b..be1b4fd 100644 --- a/minetestmapper-numpy.py +++ b/minetestmapper-numpy.py @@ -464,8 +464,11 @@ class LVLDB: def __iter__(self): for k in self.conn.RangeIter(): - x, y, z = getIntegerAsBlock(int(k[0])) - yield x, y, z, k[0] + if k is not None and len(k)>0: + x, y, z = getIntegerAsBlock(int(k[0])) + yield x, y, z, k[0] + else: + print("WARNING: no data at first index in value '"+str(k)) def get(self, pos): return BytesIO(self.conn.Get(pos))