IndexError: list index out of range
Closed this issue · 2 comments
Dear wwydmanski
I would like to thank you very much for sharing the code, procedure ..etc. really it is very helpful and hopefully all researchers do like you.
kindly note that when I ran the simulation I got the following error:
Traceback (most recent call last):
File "scratch/linear-mesh/agent_training.py", line 76, in
parameters=hyperparams)
File "/home/kriss/ns3-gym-master/scratch/linear-mesh/agents/teacher.py", line 188, in train
logger = Logger(send_logs, tags, parameters, experiment=experiment)
File "/home/kriss/ns3-gym-master/scratch/linear-mesh/agents/teacher.py", line 24, in init
json_loc = glob.glob("./**/comet_token.json")[0]
IndexError: list index out of range
this is the output of the "python scratch/linear-mesh/agent_training.py" command
#python scratch/linear-mesh/agent_training.py
Steps per episode: 6000
Waiting for simulation script to connect on port: tcp://localhost:45502
Please start proper ns-3 simulation script using ./waf --run "..."
Waf: Entering directory /home/kriss/ns3-gym-master/build' Waf: Leaving directory
/home/kriss/ns3-gym-master/build'
Build commands will be stored in build/compile_commands.json
'build' finished successfully (2.768s)
Ns3Env parameters:
--nWifi: 6
--simulationTime: 60
--openGymPort: 45502
--envStepTime: 0.01
--seed: -1
--agentType: continuous
--scenario: convergence
--dryRun: 0
Simulation started
Simulation process id: 4670 (parent (waf shell) id: 4661)
Waiting for Python process to connect on port: tcp://localhost:45502
Please start proper Python Gym Agent
Observation space shape: (1, 300)
Action space shape: (1, 1)
CuDNN version: 7102
cpu
COMET INFO: Experiment is live on comet.ml https://www.comet.ml/xxxxxxxx/rl-in-wifi/......
Traceback (most recent call last):
File "scratch/linear-mesh/agent_training.py", line 76, in
parameters=hyperparams)
File "/home/kriss/ns3-gym-master/scratch/linear-mesh/agents/teacher.py", line 188, in train
logger = Logger(send_logs, tags, parameters, experiment=experiment)
File "/home/kriss/ns3-gym-master/scratch/linear-mesh/agents/teacher.py", line 24, in init
json_loc = glob.glob(".//comet_token.json")[4]
IndexError: list index out of range**
COMET INFO: ----------------------------
COMET INFO: Comet.ml Experiment Summary:
COMET INFO: Data:
COMET INFO: url: https://www.comet.ml/xxxxxxxx/rl-in-wifi/.....
COMET INFO: ----------------------------
COMET INFO: Uploading stats to Comet before program termination (may take several seconds)
Could you please help to know what is the problem???
Hi,
it looks like for some reason python process couldn't find the comet_token.json
file.
I've pushed a fix to this problem, could you check if it works for you now?
Closed due to inactivity