question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

NotImplementedError when executing Pong example

See original GitHub issue

Hey guys, first of all thanks a lot for this project. It might become handy during my studies 😃

I ran into an error while executing the example. I downloaded the pretrained model, but python3 -m baselines.deepq.experiments.atari.enjoy --model-dir /tmp/models/model-atari-duel-pong-1 --env Pong --dueling raised the following error:

[2018-01-31 12:24:50,221] Making new env: PongNoFrameskip-v4
Traceback (most recent call last):
  File "/usr/lib/python3.4/runpy.py", line 170, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/lib/python3.4/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/home/username/keras-tf-p3/baselines/baselines/deepq/experiments/atari/enjoy.py", line 70, in <module>
    play(env, act, args.stochastic, args.video)
  File "/home/username/keras-tf-p3/baselines/baselines/deepq/experiments/atari/enjoy.py", line 43, in play
    obs = env.reset()
  File "/home/username/keras-tf-p3/baselines/baselines/common/atari_wrappers.py", line 167, in reset
    ob = self.env.reset()
  File "/home/username/keras-tf-p3/lib/python3.4/site-packages/gym/core.py", line 104, in reset
    return self._reset()
  File "/home/username/keras-tf-p3/lib/python3.4/site-packages/gym/core.py", line 283, in _reset
    return self.env.reset()
  File "/home/username/keras-tf-p3/lib/python3.4/site-packages/gym/core.py", line 104, in reset
    return self._reset()
  File "/home/username/keras-tf-p3/lib/python3.4/site-packages/gym/core.py", line 310, in _reset
    observation = self.env.reset()
  File "/home/username/keras-tf-p3/lib/python3.4/site-packages/gym/core.py", line 104, in reset
    return self._reset()
  File "/home/username/keras-tf-p3/lib/python3.4/site-packages/gym/core.py", line 311, in _reset
    return self._observation(observation)
  File "/home/username/keras-tf-p3/lib/python3.4/site-packages/gym/core.py", line 321, in _observation
    raise NotImplementedError
NotImplementedError

The cartpole example however works fine (python -m baselines.deepq.experiments.train_cartpole)

I found this issue in gym (https://github.com/openai/gym/issues/775) with the same error message, but mine seems to occur in reset() and not in render(). Downgrading to pyglet version 1.2.4 as suggested did not change anything.

Does someone know a solution to this?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:12 (3 by maintainers)

github_iconTop GitHub Comments

3reactions
hudsontekcommented, Jan 2, 2021

It may be a version-conflict problem. Upgrading the gym or Downgrading can solve it.

In my case, downgrading from 0.18 to 0.10 solved the problem.

1reaction
NoobHuacommented, Dec 14, 2020

It may be a version-conflict problem. Upgrading the gym or Downgrading can solve it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Gym atari installation - reinforcement-learning - PyTorch Forums
Hi, I want to run the pytorch-a3c example with env = PongDeterministic-v4. I've had gym, gym[atari], atari-py installed by pip3.
Read more >
First OOP in Python 3: Pygame Pong
I have been studying Python for a few months and just recently decided to stop avoiding OOP and reworked a Pong game to...
Read more >
raise NotImplementedError if advnstd 0 advn advn advnmean ...
raise NotImplementedErrorif adv_n.std() > 0:adv_n = (adv_n - adv_n.mean()) / adv_n.std()else:adv_n = adv_n - adv_n.mean()# YOUR_CODE_HEREreturn q_n, ...
Read more >
Typer Error in Kivy while running a simple pong tutorial
I wrote the code exactly as the tutorial. I use F5 to run the program from IDLE and I get a return game()...
Read more >
How to Add Websockets to a Django App without Extra ...
This file provides the default Django ASGI setup, and exposes an ASGI application called application which can be run using an ASGI server...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found