Open Lr-2002 opened 7 months ago
Traceback (most recent call last):
File "/home/lr-2002/code/lwm/world_model/play_wm.py", line 54, in <module>
env.render()
File "/home/lr-2002/anaconda3/envs/lwm/lib/python3.9/site-packages/gym/core.py", line 286, in render
return self.env.render(mode, **kwargs)
File "/home/lr-2002/anaconda3/envs/lwm/lib/python3.9/site-packages/gym/core.py", line 286, in render
return self.env.render(mode, **kwargs)
File "/home/lr-2002/anaconda3/envs/lwm/lib/python3.9/site-packages/gym/core.py", line 286, in render
return self.env.render(mode, **kwargs)
[Previous line repeated 1 more time]
TypeError: render() takes 1 positional argument but 2 were given
original
def render(self, mode="human", **kwargs):
return self.env.render(mode, **kwargs)
after delete the render's args to this :
def render(self):
return self.env.render()
Traceback (most recent call last):
File "/home/lr-2002/code/lwm/world_model/play_wm.py", line 54, in <module>
env.render()
File "/home/lr-2002/anaconda3/envs/lwm/lib/python3.9/site-packages/gym/core.py", line 286, in render
return self.env.render()
File "/home/lr-2002/anaconda3/envs/lwm/lib/python3.9/site-packages/gym/core.py", line 286, in render
return self.env.render()
File "/home/lr-2002/anaconda3/envs/lwm/lib/python3.9/site-packages/gym/core.py", line 286, in render
return self.env.render()
[Previous line repeated 1 more time]
File "/home/lr-2002/code/lwm/messenger/envs/base.py", line 44, in render
raise NotImplementedError
NotImplementedError
Hi, what version of gym are you using? There are often versioning issues with env.render() and env.step() arguments.
gym == 0.22.0 pygame == 2.5.1
Hi sorry I didn't get to this, @Lr-2002 is this still an issue that you're having? It's most likely a simple change with regards to the gym environment and the extra parameters that env.render() might expect.
Hello, Thanks for your great work, It has did a lot in language work, While ,When i'm trying to run the
play_wm.py
, It throw the error of gym.render() need 1 positional args, while 2 were given. Then i delete the render func 'args to only self Re-run play, It throw the error of "Not Implementderror"