Skip to content

TypeError: unsupported operand type(s) for -: 'int' and 'NoneType' #33

@fmalato

Description

@fmalato

I installed the environment as specified in the README.md file, using conda:

git clone https://github.com/iglu-contest/gridworld.git
cd gridworld && conda env create -f env.yml

Then I found out that gridworld doesn't get installed, so I installed it manually with cd gridworld && pip install -e .

Now when I try to run the example code, I get this error:

Traceback (most recent call last):
  File "main.py", line 17, in <module>
    obs, reward, done, info = env.step(action)
  File "/home/federima/miniconda3/envs/gridworld_env/lib/python3.7/site-packages/gym/wrappers/order_enforcing.py", line 13, in step
    observation, reward, done, info = self.env.step(action)
  File "/home/federima/PycharmProjects/gridworld_test/gridworld/gridworld/env.py", line 326, in step
    obs, reward, done, info = super().step(action)
  File "/home/federima/miniconda3/envs/gridworld_env/lib/python3.7/site-packages/gym/core.py", line 280, in step
    return self.env.step(action)
  File "/home/federima/PycharmProjects/gridworld_test/gridworld/gridworld/env.py", line 290, in step
    synthetic_grid = self.grid - self._synthetic_init_grid
TypeError: unsupported operand type(s) for -: 'int' and 'NoneType'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions