minecraft-py / minecraft

A Minecraft-like game written in python3
GNU General Public License v3.0
157 stars 25 forks source link

Error when loading world #29

Closed lp-ke closed 2 years ago

lp-ke commented 2 years ago

`Minecraft version: 0.3.2 python version: 3.10.1 for linux pyglet version: 1.5.21(OpenGL 3.0 Mesa 21.3.3) time: Wed Jan 12 16:44:39 2022 save: yeet traceback

Traceback (most recent call last): File "/home/kevin/Minecraft/minecraft/start.py", line 208, in start_game pyglet.app.run() File "/home/kevin/.local/lib/python3.10/site-packages/pyglet/app/init.py", line 107, in run event_loop.run() File "/home/kevin/.local/lib/python3.10/site-packages/pyglet/app/base.py", line 169, in run timeout = self.idle() File "/home/kevin/.local/lib/python3.10/site-packages/pyglet/app/base.py", line 245, in idle window.dispatch_event('on_draw') File "/home/kevin/.local/lib/python3.10/site-packages/pyglet/window/init.py", line 1352, in dispatch_event if EventDispatcher.dispatch_event(self, args) != False: File "/home/kevin/.local/lib/python3.10/site-packages/pyglet/event.py", line 420, in dispatch_event raise e File "/home/kevin/.local/lib/python3.10/site-packages/pyglet/event.py", line 415, in dispatch_event if getattr(self, event_type)(args): File "/home/kevin/Minecraft/minecraft/game.py", line 493, in on_draw self.world.init_world() File "/home/kevin/Minecraft/minecraft/world/world.py", line 52, in init_world self.init_random_world() File "/home/kevin/Minecraft/minecraft/world/world.py", line 72, in init_random_world h = int(self.simplex.noise2d(x=x / 25, y=z / 25) * 3 + SEA_LEVEL) AttributeError: 'OpenSimplex' object has no attribute 'noise2d' ==================================`

zhengxyz123 commented 2 years ago

Oh, the opensimplex module updated.

Trying replace noise2d to noise2.

lp-ke commented 2 years ago

maybe you should change your requirements to a fixed version in the future, for example: opensimplex==0.4