Browse Source

debugging leveldb issues

master
poikilos 9 years ago
committed by Jacob Gustafson
parent
commit
1d496a1158
  1. 4
      minetestmapper-numpy.py

4
minetestmapper-numpy.py

@ -467,6 +467,7 @@ class LVLDB:
for k in self.conn.RangeIter(): for k in self.conn.RangeIter():
#if k is not None and len(k)>0: #if k is not None and len(k)>0:
try: try:
print("getting int from first index of value "+str(k))
#val = k[0] #val = k[0]
#if k[0][:2]=="\\x": #if k[0][:2]=="\\x":
#in leveldb, minetest stores \x before every byte of the value, so remove all and prepend 0x so python can convert to int #in leveldb, minetest stores \x before every byte of the value, so remove all and prepend 0x so python can convert to int
@ -474,7 +475,8 @@ class LVLDB:
x, y, z = getIntegerAsBlock(int(val)) x, y, z = getIntegerAsBlock(int(val))
yield x, y, z, k[0] yield x, y, z, k[0]
except: except:
print("Could not finish getting int from first index of value "+str(k)) pass
#print("Could not finish getting int from first index of value "+str(k))
#prints tons of output such as Could not finish getting int from first index of value ('\x00\x00\x00\x0e\x00\x02\x85 ', '\x19\x08\x02\x02x\x9c\xed\xc11\x01\x00\x00\x00\xc2\xa0\xf5Om\x0c\x1f\xa0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\xb7\x01@\x00\x00\x01x\x9cc\x00\x00\x00\x01\x00\x01\x00\x00\x00\xff\xff\xff\xff\x00\x00\x01\x00\x00\x00\x06ignore\n\x00\x00') #prints tons of output such as Could not finish getting int from first index of value ('\x00\x00\x00\x0e\x00\x02\x85 ', '\x19\x08\x02\x02x\x9c\xed\xc11\x01\x00\x00\x00\xc2\xa0\xf5Om\x0c\x1f\xa0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\xb7\x01@\x00\x00\x01x\x9cc\x00\x00\x00\x01\x00\x01\x00\x00\x00\xff\xff\xff\xff\x00\x00\x01\x00\x00\x00\x06ignore\n\x00\x00')

Loading…
Cancel
Save