AminHP/gym-anytrading

SB3 check_env() Error

0trade opened this issue · 2 comments

import gym
from gym_anytrading.envs import TradingEnv, ForexEnv, Actions, Positions
from gym_anytrading.datasets import FOREX_EURUSD_1H_ASK
from stable_baselines3.common.env_checker import check_env

env = gym.make('forex-v0', frame_bound=(10, 500), window_size=10)
check_env(env)

The error message:

AssertionError: The observation returned by the `reset()` method does not match the given observation space

I just get this warning:

"UserWarning: Your observation has an unconventional shape (neither an image, nor a 1D vector). We recommend you to flatten the observation to have only a 1D vector or use a custom policy to properly process the data."

The error was gone, when I switch to other conda environments, I think the problem maybe is stable-baseline3 or gym version.