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

Missing attribute 'RAND_LIMIT' in modules Box2D #250

Closed
ghost opened this issue Aug 1, 2018 · 6 comments
Closed

Missing attribute 'RAND_LIMIT' in modules Box2D #250

ghost opened this issue Aug 1, 2018 · 6 comments
Assignees
Labels
bug Something isn't working packaging

Comments

@ghost
Copy link

ghost commented Aug 1, 2018

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

@ghost ghost added the bug Something isn't working label Aug 1, 2018
@ryanjulian
Copy link
Member

ryanjulian commented Aug 1, 2018

This is documented in dockerfile/Dockerfile.ci.

The solution is:

conda activate garage
pip uninstall -y Box2D Box2D-kengz box2d-py
pip install Box2D

See openai/gym#100 and pybox2d/pybox2d#82

@ghost
Copy link
Author

ghost commented Aug 1, 2018

Yes, I just noticed with grep -n -r "box2d-py" in garage.

@ghost ghost closed this as completed Aug 1, 2018
@ryanjulian
Copy link
Member

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

@ghost
Copy link
Author

ghost commented Aug 10, 2018

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

@ghost ghost mentioned this issue Aug 13, 2018
@ryanjulian ryanjulian added this to the 2018.10 Release milestone Oct 9, 2018
@ryanjulian
Copy link
Member

ref #319

@naeioi
Copy link
Member

naeioi commented Oct 25, 2018

This issue is fixed in #335 . Closed.

@naeioi naeioi closed this as completed Oct 25, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working packaging
Projects
None yet
Development

No branches or pull requests

2 participants