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

Compatibility with Peters Algorithm #64

Open
kamranvat opened this issue Sep 28, 2023 · 0 comments
Open

Compatibility with Peters Algorithm #64

kamranvat opened this issue Sep 28, 2023 · 0 comments

Comments

@kamranvat
Copy link

The following things need to be manually fixed before working with files generated from the s.peters_algorithm repo (develop branch) and this one (dev branch):

  • An AttributeError gets raised:
".../MuJoCo_Gym/mujoco_rl.py", line 77, in __instantiateJson
    self.info_name_list = [key for key in self.info_json["environment"]["objects"].keys()] #ToDo: is this not a df? looks like a list or sth
AttributeError: 'list' object has no attribute 'keys'

This is because the dictionary is inside a list, looking into self.info_json["environment"]["objects"][0].keys()] instead works.

  • Similarly, a Type error occurs:
".../MuJoCo_Gym/mujoco_rl.py", line 283, in filter_by_tag
    if "tags" in self.info_json["environment"]["objects"][object].keys():
TypeError: list indices must be integers or slices, not dict

which can be resolved by iterating over the range of the amount of objects, instead of the objects themselves.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant