Closed Nicolas99-9 closed 6 years ago
Edit : I fixed it by adding self._seed = 99 in "trading_env.py".
Thanks @Nicolas99-9
@AdrianP Hi guys How can I fix this error?
runfile('C:/Users/jalal/Desktop/RL/gym_trading-master/run.py', wdir='C:/Users/jalal/Desktop/RL/gym_trading-master') Traceback (most recent call last):
File "
File "C:\Anaconda3\lib\site-packages\spyder\utils\site\sitecustomize.py", line 705, in runfile execfile(filename, namespace)
File "C:\Anaconda3\lib\site-packages\spyder\utils\site\sitecustomize.py", line 102, in execfile exec(compile(f.read(), filename, 'exec'), namespace)
File "C:/Users/jalal/Desktop/RL/gym_trading-master/run.py", line 2, in
File "C:\Users\jalal\Desktop\RL\gym_trading-master\gym_trading__init__.py", line 5, in
File "C:\Anaconda3\lib\site-packages\gym\envs\registration.py", line 164, in register return registry.register(id, **kwargs)
File "C:\Anaconda3\lib\site-packages\gym\envs\registration.py", line 157, in register raise error.Error('Cannot re-register id: {}'.format(id))
Error: Cannot re-register id: trading-v0
I try to create a new environnment but I have a problem :
Traceback (most recent call last): File "test.py", line 16, in
env = gym.make('trading-v0')
File "/home/nicolas/.local/lib/python3.5/site-packages/gym/envs/registration.py", line 163, in make
return registry.make(id)
File "/home/nicolas/.local/lib/python3.5/site-packages/gym/envs/registration.py", line 121, in make
patch_deprecated_methods(env)
File "/home/nicolas/.local/lib/python3.5/site-packages/gym/envs/registration.py", line 181, in patch_deprecated_methods
env.seed = env._seed
AttributeError: 'TradingEnv' object has no attribute '_seed'
Versions : gym (0.9.6)
Does it requires an older version of gym ?