Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot run the basic program #15

Closed
Arseni1919 opened this issue Aug 25, 2022 · 2 comments
Closed

Cannot run the basic program #15

Arseni1919 opened this issue Aug 25, 2022 · 2 comments

Comments

@Arseni1919
Copy link

Is this bug or I do something wrong?
The code from your README.md file..

import gym
import rware
env = gym.make("rware-tiny-2ag-v1")
obs = env.reset()  # a tuple of observations

actions = env.action_space.sample()  # the action space can be sampled
print(actions)  # (1, 0)
n_obs, reward, done, info = env.step(actions)

print(done)    # [False, False]
print(reward)  # [0.0, 0.0]
env.render()

The output:

Traceback (most recent call last):
  File "/Users/perchik/PycharmProjects/Try_OpenAI_GYM/main.py", line 3, in <module>
    env = gym.make("rware-tiny-2ag-v1")
  File "/Users/perchik/opt/anaconda3/envs/Try_OpenAI_GYM/lib/python3.10/site-packages/gym/envs/registration.py", line 662, in make
    env = env_creator(**_kwargs)
  File "/Users/perchik/opt/anaconda3/envs/Try_OpenAI_GYM/lib/python3.10/site-packages/rware/warehouse.py", line 247, in __init__
    self._use_slow_obs()
  File "/Users/perchik/opt/anaconda3/envs/Try_OpenAI_GYM/lib/python3.10/site-packages/rware/warehouse.py", line 313, in _use_slow_obs
    [
  File "/Users/perchik/opt/anaconda3/envs/Try_OpenAI_GYM/lib/python3.10/site-packages/rware/warehouse.py", line 344, in <listcomp>
    "local_message": spaces.MultiBinary(
  File "/Users/perchik/opt/anaconda3/envs/Try_OpenAI_GYM/lib/python3.10/site-packages/gym/spaces/multi_binary.py", line 45, in __init__
    assert (np.asarray(input_n) > 0).all()  # n (counts) have to be positive
AssertionError

Why so? Can you help?
Thanks in advance

@semitable
Copy link
Owner

duplicate of #13

@semitable
Copy link
Owner

and #10

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants