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.

Pendulum examples don't work

See original GitHub issue

Steps to reproduce

virtualenv -p $(which python3) env
. ./env/bin/activate
pip install h5py gym keras-rl tensorflow
git clone https://github.com/keras-rl/keras-rl.git
cd keras-rl
python examples/ddpg_pendulum.py
  • Alternatively you can install keras-rl with python setup.py install. Same result
  • Same result with either python 2 or 3
  • The same result happens with examples/naf_pendulum.py.

Actual Result

Using TensorFlow backend.
Traceback (most recent call last):
  File "examples/ddpg_pendulum.py", line 14, in <module>
    gym.undo_logger_setup()
AttributeError: 'module' object has no attribute 'undo_logger_setup'

Expected Result

This

Workaround

Just commenting out that offending line seems to work.

gym.undo_logger_setup()

I’m new to gym. I don’t know how essential that line is. Should I just submit a pull request with that line removed?

Other Info

pip list

Package             Version   
------------------- ----------
absl-py             0.6.1     
astor               0.7.1     
certifi             2018.10.15
chardet             3.0.4     
future              0.17.1    
gast                0.2.0     
grpcio              1.16.0    
gym                 0.10.9    
h5py                2.8.0     
idna                2.7       
Keras               2.2.4     
Keras-Applications  1.0.6     
Keras-Preprocessing 1.0.5     
keras-rl            0.4.2     
Markdown            3.0.1     
numpy               1.15.4    
pip                 18.1      
protobuf            3.6.1     
pyglet              1.3.2     
PyYAML              4.2b4     
requests            2.20.0    
scipy               1.1.0     
setuptools          40.5.0    
six                 1.11.0    
tensorboard         1.12.0    
tensorflow          1.12.0    
termcolor           1.1.0     
urllib3             1.24.1    
Werkzeug            0.14.1    
wheel               0.32.2

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:8 (1 by maintainers)

github_iconTop GitHub Comments

5reactions
DarrellBestcommented, Apr 18, 2020

Still having this bug in 2020

3reactions
ppranonymouscommented, Oct 21, 2019

Same error

Read more comments on GitHub >

github_iconTop Results From Across the Web

Physics Tutorial: Pendulum Motion
A simple pendulum consists of a relatively massive object hung by a string from a fixed support. It typically hangs vertically in its...
Read more >
Chapter 24 Physical Pendulum
A physical pendulum consists of a uniform rod of length d and mass m pivoted at one end. The pendulum is initially displaced...
Read more >
AP Physics 1 : Pendulums - Varsity Tutors
Study concepts, example questions & explanations for AP Physics 1 ... Changing the mass of the pendulum does not affect the frequency, and...
Read more >
The Simple Pendulum - YouTube
This physics video tutorial discusses the simple harmonic motion of a pendulum. It provides the equations that you need to calculate the ...
Read more >
Swinging with a Pendulum - Scientific American
A pendulum is an object hung from a fixed point that swings back and forth under the action of gravity. In the example...
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