openai / multi-agent-emergence-environments

Environment generation code for the paper "Emergent Tool Use From Multi-Agent Autocurricula"
MIT License
1.64k stars 307 forks source link

Error when running bin/examine.py without the pre-trained model #19

Open TalfrynK opened 4 years ago

TalfrynK commented 4 years ago

Whenever I try to run the environments such as base or hide_and_seek through the bin/examine.py hide_and_seek or base commands I receive this error:

Inferred:
    names: hide_and_seek.py
    arguments: {}

Traceback (most recent call last):
  File "bin/examine.py", line 91, in <module>
    main()
  File "/home/avi/anaconda3/envs/python3.6/lib/python3.6/site-packages/click/core.py", line 764, in __call__
    return self.main(*args, **kwargs)
  File "/home/avi/anaconda3/envs/python3.6/lib/python3.6/site-packages/click/core.py", line 717, in main
    rv = self.invoke(ctx)
  File "/home/avi/anaconda3/envs/python3.6/lib/python3.6/site-packages/click/core.py", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/avi/anaconda3/envs/python3.6/lib/python3.6/site-packages/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "bin/examine.py", line 47, in main
    env_viewer=EnvViewer)
  File "/home/avi/Desktop/hideandseek/mujoco-worldgen/mujoco_worldgen/util/envs/examine_env.py", line 26, in examine_env
    return_args_remaining=True, **env_kwargs)
  File "/home/avi/Desktop/hideandseek/mujoco-worldgen/mujoco_worldgen/util/envs/flexible_load.py", line 88, in load_env
    matching = (glob(join(core_dir, envs_dir, "**", "*.py"), recursive=True) +
  File "/home/avi/anaconda3/envs/python3.6/lib/python3.6/posixpath.py", line 94, in join
    genericpath._check_arg_types('join', a, *p)
  File "/home/avi/anaconda3/envs/python3.6/lib/python3.6/genericpath.py", line 149, in _check_arg_types
    (funcname, s.__class__.__name__)) from None
TypeError: join() argument must be str or bytes, not 'tuple'

I'm not sure how to fix it and running the environments with the pre-trained models works perfectly fine.

AmitMandliya commented 4 years ago

I am facing the same issue. Were you able to fix it?

shangdongyang commented 4 years ago

Mee too, how to solve this problem?

vonHartz commented 4 years ago

I had the same problem and fixed it with pull request #22 .

HACLANG commented 4 years ago

Mee too, But I have solved it in the following way:

pip3 install jsonnet
pip install jsonnet

then run:

git clone https://github.com/openai/mujoco-py.git
cd mujoco-py/
sudo apt-get update
sudo apt-get install patchelf
sudo apt-get install python3 python-dev python3-dev build-essential libssl-dev libffi-dev libxml2-dev libxslt1-dev zlib1g-dev libglew1.5 libglew-dev python-pip
sudo apt-get install libgl1-mesa-dev libgl1-mesa-glx libosmesa6-dev python3-pip python3-numpy python3-scipy
sudo pip3 install -r requirements.txt
sudo pip3 install -r requirements.dev.txt
sudo python3 setup.py install
sudo pip3 install gym
sudo pip install requirements.txt -e .
sudo pip install requirements.dev.txt -e .
pip install -e .
pavlosSkev commented 4 years ago

I had the same error. I fixed it by running it like this:

python bin/examine.py examples/blueprint.jsonnet examples/blueprint.npz

It has something to do with the imports I think. So just be outside the "bin" folder, and run this command.