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

A problem about OpenAI! #534

Open
hychong1997 opened this issue Sep 26, 2021 · 1 comment
Open

A problem about OpenAI! #534

hychong1997 opened this issue Sep 26, 2021 · 1 comment

Comments

@hychong1997
Copy link

hychong1997 commented Sep 26, 2021

Hi!
I am trying to use the OpenAI following the procedure on https://www.scrimmagesim.org/sphinx/html/tutorials/openai-plugin.html.
I use Ubuntu 18.04. All of the files are built successfully.
However when i ran "python my_openai.py", it showed :
Traceback (most recent call last):
File "/home/hyc/scrimmage/scrimmage/env/lib/python3.6/site-packages/gym/envs/registration.py", line 121, in spec
return self.env_specs[id]
KeyError: 'scrimmage-v0'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "my_openai.py", line 16, in test_openai
env = gym.make('scrimmage-v0')
File "/home/hyc/scrimmage/scrimmage/env/lib/python3.6/site-packages/gym/envs/registration.py", line 145, in make
return registry.make(id, **kwargs)
File "/home/hyc/scrimmage/scrimmage/env/lib/python3.6/site-packages/gym/envs/registration.py", line 89, in make
spec = self.spec(path)
File "/home/hyc/scrimmage/scrimmage/env/lib/python3.6/site-packages/gym/envs/registration.py", line 131, in spec
raise error.UnregisteredEnv('No registered env with id: {}'.format(id))
gym.error.UnregisteredEnv: No registered env with id: scrimmage-v0

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "my_openai.py", line 52, in
test_openai()
File "my_openai.py", line 28, in test_openai
env = gym.make('scrimmage-v0')
File "/home/hyc/scrimmage/scrimmage/env/lib/python3.6/site-packages/gym/envs/registration.py", line 145, in make
return registry.make(id, **kwargs)
File "/home/hyc/scrimmage/scrimmage/env/lib/python3.6/site-packages/gym/envs/registration.py", line 90, in make
env = spec.make(kwargs)
File "/home/hyc/scrimmage/scrimmage/env/lib/python3.6/site-packages/gym/envs/registration.py", line 60, in make
env = cls(
_kwargs)
TypeError: init(): incompatible constructor arguments. The following argument types are supported:
1. scrimmage.bindings.py_bindings.ScrimmageOpenAIEnv(mission_file: str, combine_actors: bool=False, global_sensor: bool=False, static_obs_space: bool=True, timestep: float=-1)

Invoked with: kwargs: enable_gui=False, mission_file='/home/hyc/scrimmage/my-scrimmage-plugins/missions/openai_mission.xml'

Could you give me any suggestions and instructions.
Sincerely.

@frazierbaker
Copy link
Collaborator

I haven't seen this error before, but I'm happy to make some suggestions. Have you tried removing enable_gui=False? It doesn't seem to be listed in the TypeError. Also, can you tell me what version of gym you're using in case this is something we need to update to work with a newer version of OpenAI Gym.

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