Closed huangjiancong1 closed 5 years ago
It seems like a problem in your config.ini. You should have a section [simulation]
total_max_steps=X
An example of config.ini is given in the readme.
I have it in config.ini
[simulation]
total_max_steps=20000000
testing_each=20
#number of trajectories for testing
testing_trials=1
Could you try with the new commit 80c4f6669605e6ce5b876a3219fbb470e8f6b1e1. My guess it that's it can't find your config.ini ?
I agree that the VScode debug can't find the config.ini too.
Can not solve, it seems that VScode IDE debugging is different with pdb debugging, the return of config.read(clparams[config])
VScode:
pdb:
> /home/jim/ddrl/gym/run.py(65)<module>()
-> config.read(clparams['config'])
(Pdb) p config.read
config.read config.read_file config.readfp
config.read_dict config.read_string
(Pdb) p config.read
config.read config.read_file config.readfp
config.read_dict config.read_string
(Pdb) p config.read(clparams['config'])
['config.ini']
(Pdb)
You can specify a custom path for the config.ini by using --config while calling run.py
Fixed!
I can run this scripts in the terminal but when debugging in VScode, it have error in this line:
total_max_steps=int(config['simulation']['total_max_steps'])
Have you seen this problem before?
I can debug use pdb but vscode is supper powerful than pdb, which IDE you use for debug?