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

Error in multiple crypto env: AttributeError: ‘CryptoEnv’ object has no attribute ‘observation_space’ #141

Open
liamsi9 opened this issue Apr 25, 2022 · 1 comment
Labels
bug Something isn't working

Comments

@liamsi9
Copy link

liamsi9 commented Apr 25, 2022

Hello,

I am having an issue with the multiple crypto env. Anybody's help would be appreciated. Thanks!

model = agent.get_model(model_name, model_kwargs=agent_params) File “/Users/smail/Desktop/TraderAI/TraderAI/10-finrl/FinRL-Meta/agents/stablebaselines3_models.py”, line 88, in get_model model = MODELS[model_name]( File “/Users/smail/Desktop/TraderAI/TraderAI/10-finrl/FinRL-Meta/env/lib/python3.8/site-packages/stable_baselines3/ddpg/ddpg.py”, line 81, in __init__ super(DDPG, self).__init__( File “/Users/smail/Desktop/TraderAI/TraderAI/10-finrl/FinRL-Meta/env/lib/python3.8/site-packages/stable_baselines3/td3/td3.py”, line 91, in __init__ super(TD3, self).__init__( File “/Users/smail/Desktop/TraderAI/TraderAI/10-finrl/FinRL-Meta/env/lib/python3.8/site-packages/stable_baselines3/common/off_policy_algorithm.py”, line 107, in __init__ super(OffPolicyAlgorithm, self).__init__( File “/Users/smail/Desktop/TraderAI/TraderAI/10-finrl/FinRL-Meta/env/lib/python3.8/site-packages/stable_baselines3/common/base_class.py”, line 163, in __init__ env = self._wrap_env(env, self.verbose, monitor_wrapper) File “/Users/smail/Desktop/TraderAI/TraderAI/10-finrl/FinRL-Meta/env/lib/python3.8/site-packages/stable_baselines3/common/base_class.py”, line 207, in _wrap_env env = DummyVecEnv([lambda: env]) File “/Users/smail/Desktop/TraderAI/TraderAI/10-finrl/FinRL-Meta/env/lib/python3.8/site-packages/stable_baselines3/common/vec_env/dummy_vec_env.py”, line 27, in __init__ VecEnv.__init__(self, len(env_fns), env.observation_space, env.action_space) File “/Users/smail/Desktop/TraderAI/TraderAI/10-finrl/FinRL-Meta/env/lib/python3.8/site-packages/gym/core.py”, line 238, in __getattr__ return getattr(self.env, name) AttributeError: ‘CryptoEnv’ object has no attribute ‘observation_space’

@liamsi9 liamsi9 changed the title Error in multiple crypto env Error in multiple crypto env: AttributeError: ‘CryptoEnv’ object has no attribute ‘observation_space’ Apr 25, 2022
@YangletLiu YangletLiu added the bug Something isn't working label Apr 26, 2022
@segatrade
Copy link

Got connected bug when tried run CryptoEnv with rllib from tutorial:

File "/home/usr0/venvpy38/lib/python3.8/site-packages/ray/rllib/evaluation/rollout_worker.py", line 1698, in _validate_env
   if not env.observation_space.contains(dummy_obs):
AttributeError: 'NoneType' object has no attribute 'contains'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants