Skip to content
This repository has been archived by the owner on May 6, 2024. It is now read-only.

Fix the name of the environment in README #136

Merged
merged 1 commit into from
Nov 26, 2020

Conversation

shagunsodhani
Copy link
Contributor

Current stack trace

python -m nle.scripts.play --env nethack
Traceback (most recent call last):
  File "/private/home/sodhani/.conda/envs/nle/lib/python3.8/runpy.py", line 194, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/private/home/sodhani/.conda/envs/nle/lib/python3.8/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/private/home/sodhani/.conda/envs/nle/lib/python3.8/site-packages/nle/scripts/play.py", line 238, in <module>
    main()
  File "/private/home/sodhani/.conda/envs/nle/lib/python3.8/site-packages/nle/scripts/play.py", line 234, in main
    play(**vars(flags))
  File "/private/home/sodhani/.conda/envs/nle/lib/python3.8/site-packages/nle/scripts/play.py", line 82, in play
    env = gym.make(env_name, savedir=savedir, max_episode_steps=max_steps)
  File "/private/home/sodhani/.conda/envs/nle/lib/python3.8/site-packages/gym/envs/registration.py", line 145, in make
    return registry.make(id, **kwargs)
  File "/private/home/sodhani/.conda/envs/nle/lib/python3.8/site-packages/gym/envs/registration.py", line 89, in make
    spec = self.spec(path)
  File "/private/home/sodhani/.conda/envs/nle/lib/python3.8/site-packages/gym/envs/registration.py", line 118, in spec
    raise error.Error('Attempted to look up malformed environment ID: {}. (Currently all IDs must be of the form {}.)'.format(id.encode('utf-8'), env_id_re.pattern))
gym.error.Error: Attempted to look up malformed environment ID: b'nethack'. (Currently all IDs must be of the form ^(?:[\w:-]+\/)?([\w:.-]+)-v(\d+)$.)

After the fix

 python -m nle.scripts.play --env NetHackScore-v0
Available actions: (<MiscAction.MORE: 13>, <CompassDirection.N: 107>, <CompassDirection.E: 108>, <CompassDirection.S: 106>, <CompassDirection.W: 104>, <CompassDirection.NE: 117>, <CompassDirection.SE: 110>, <CompassDirection.SW: 98>, <CompassDirection.NW: 121>, <CompassDirectionLonger.N: 75>, <CompassDirectionLonger.E: 76>, <CompassDirectionLonger.S: 74>, <CompassDirectionLonger.W: 72>, <CompassDirectionLonger.NE: 85>, <CompassDirectionLonger.SE: 78>, <CompassDirectionLonger.SW: 66>, <CompassDirectionLonger.NW: 89>, <MiscDirection.UP: 60>, <MiscDirection.DOWN: 62>, <MiscDirection.WAIT: 46>, <Command.KICK: 4>, <Command.EAT: 101>, <Command.SEARCH: 115>)
Previous reward: 0.0
b'Hello Agent, welcome to NetHack!  You are a neutral male human Monk.'
an uncursed +2 pair of leather gloves (being worn)
an uncursed +1 robe (being worn)
a blessed spellbook of protection
an uncursed scroll of identify
2 uncursed potions of healing
a blessed potion of healing
3 uncursed food rations
5 uncursed apples
6 uncursed oranges
3 uncursed fortune cookies
an uncursed oil lamp





                                 --------
                                 |$.....|
                                 |......|
                                 ....d@.+
                                 ----.---

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Nov 26, 2020
Copy link
Contributor

@heiner heiner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@heiner heiner merged commit 8688743 into facebookresearch:master Nov 26, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants