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.

Missing attribute 'RAND_LIMIT' in modules Box2D

See original GitHub issue

The following traceback is produced when running examples/tf/trpo_cartpole.py:

  File "examples/tf/trpo_cartpole.py", line 3, in <module>
    from garage.envs.box2d import CartpoleEnv
  File "/home/aigonzal/ivanWorkspace/garage/garage/envs/box2d/__init__.py", line 1, in <module>
    from garage.envs.box2d.box2d_env import Box2DEnv
  File "/home/aigonzal/ivanWorkspace/garage/garage/envs/box2d/box2d_env.py", line 9, in <module>
    from garage.envs.box2d.box2d_viewer import Box2DViewer
  File "/home/aigonzal/ivanWorkspace/garage/garage/envs/box2d/box2d_viewer.py", line 1, in <module>
    from Box2D import b2ContactListener
  File "/home/aigonzal/anaconda2/envs/garage/lib/python3.6/site-packages/Box2D/__init__.py", line 20, in <module>
    from .Box2D import *
  File "/home/aigonzal/anaconda2/envs/garage/lib/python3.6/site-packages/Box2D/Box2D.py", line 434, in <module>
    RAND_LIMIT = _Box2D.RAND_LIMIT

It seems the problem is solved by running: pip install box2d-py

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
ryanjuliancommented, Aug 1, 2018

We should probably keep this open until gym/box2d fix the upstream bug.

1reaction
ghostcommented, Aug 24, 2018

Okay, in the meantime, the patch has been implemented in #258

Read more comments on GitHub >

github_iconTop Results From Across the Web

AttributeError: 'module' object has no attribute 'RAND_LIMIT ...
I have installed box2d using pip install but when I run OpenAI gym environment for box2d games with python. In my case I...
Read more >
module 'Box2D._Box2D' has no attribute 'RAND_LIMIT' · Issue ...
I can't run the LunarLander-v2 env, error occurs [2017-07-08 12:53:22066] Making new env: LunarLander-v2 Traceback (most recent call last): ...
Read more >
module 'Box2D._Box2D' has no attribute 'RAND_LIMIT' | by ...
AttributeError : module 'Box2D._Box2D' has no attribute 'RAND_LIMIT'. Gym has a lot of environments for studying about reinforcement learning.
Read more >
Locomotion of Serial Multiply-Actuated Tumbling Robots
6.5 Proposed modular schema for control of serial multiply-actuated tumbling. ... phenomena as a desirable property in designing minimalistic systems (e.g., ...
Read more >
b2JointUserData Struct Reference - Box2D
Public Attributes | List of all members. b2JointUserData Struct Reference. You can define this to inject whatever data you want in b2Joint. More....
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