Lymkwi / python-minetest

A python library to manipulate minetest's files
6 stars 3 forks source link

test.py freezes on lighting test #17

Open bobombolo opened 6 years ago

bobombolo commented 6 years ago

happens on every map I have tried

=> Lighting Complete Set/Get
^CTraceback (most recent call last):
  File "./test.py", line 317, in <module>
    main(sys.argv[1])
  File "./test.py", line 289, in main
    testLightingDone(map)
  File "./test.py", line 247, in testLightingDone
    if db.load_mapblock(i):
  File "/home/user/.minetest/mods/python-minetest-master/libminetest/map.py", line 639, in load_mapblock
    data = self.container.load(blockID)
  File "/home/user/.minetest/mods/python-minetest-master/libminetest/map.py", line 525, in load
    data = self.read(blockID)
  File "/home/user/.minetest/mods/python-minetest-master/libminetest/map.py", line 515, in read
    self.cur.execute("SELECT * from blocks where pos = {0}".format(blockID))
KeyboardInterrupt
Lymkwi commented 6 years ago

To be quite honest I have not checked compatibility of my library with versions 0.4.15 and 0.4.16. I do know it's gonna break with versions beyond 0.4.16. I'll keep you informed.

Lymkwi commented 6 years ago

I'm able to reproduce the same issue with a map generated on 0.4.14. It is trying to load a block but is unable to do so. So it keeps looping and trying to load. The issue is that there are no blocks to be loaded on my side. Did you ever generate some? This commit should change the script to detect the absence of mapblocks during the lighting test and abort that unit when there are none : https://github.com/LeMagnesium/python-minetest/commit/8bac60aedc811075912192a943f46fdbe66e9b84. Let me know if it fixes things.