zhangzhizza / Gym-Eplus

GNU General Public License v3.0
61 stars 28 forks source link

How to solve the error of AssertionError: The environment must specify an action space #8

Open yasamin62 opened 1 year ago

yasamin62 commented 1 year ago

Hi

I have installed successfully the eplus-env-0.0.1. In fact, I have done the following lines in the Windows command prompt:

cd C:\0-Yasamin...\Gym-Eplus-master git clone https://github.com/zhangzhizza/Gym-Eplus.git cd Gym-Eplus

python -m venv .env .env\Scripts\activate

pip install gym pip install -e .

then I typed "python" in cmd and continue with:

import gym import eplus_env; env = gym.make('Eplus-demo-v1');

but when I used the example and type the " env = gym.make('Eplus-demo-v1');" in the Windows command prompt, it gives this error.

env = gym.make('Eplus-demo-v1') Traceback (most recent call last): File "", line 1, in File "C:\0-Yasamin...\Gym-Eplus-master\Gym-Eplus.env\lib\site-packages\gym\envs\registration.py", line 669, in make env = PassiveEnvChecker(env) File "C:\0-Yasamin...\Gym-Eplus-master\Gym-Eplus.env\lib\site-packages\gym\wrappers\env_checker.py", line 20, in init assert hasattr( AssertionError: The environment must specify an action space. https://www.gymlibrary.dev/content/environment_creation/

I am a beginner with python and OpenAI gym, Could you please guide me to correct it? Thanks

yasamin62 commented 1 year ago

@asrjy @zhangzhizza

Songshilongi commented 11 months ago

I also want konw

asrjy commented 11 months ago

@yasamin62 @Songshilongi ensure you're using gym version 0.19

zhangzhizza commented 11 months ago

Hi,

Sorry for the delayed response. The package is quite outdated, I am currently using FMI to wrap up EnergyPlus for Python interface. That may be better for this package.

Best Zhiang

Songshilongi commented 11 months ago

@asrjy I have sloved it, I forgrt 'isopen = true'