Open mostafanorouzi opened 2 years ago
Hi, I had same problems. I'm running the code in windows environment. So first separately ran the "build_file.py" from command prompt, then exp.net.xml and other files were generated in c drive, i copied them to "large grid". And make sure to give correct path for ROOT_DIR = os.path.abspath(os.curdir).replace("\", "/") default_base_dir = ROOT_DIR + r'/large_grid'
Hope this helps, please let me know if you are still facing the issue.
Now I'm stuck with other issue "ValueError: Shape of a new variable (lr_0a_q/q/w) must be fully defined, but instead was (?, 5).". Do help me with your thoughts if you've an idea
Hi There was a problem while training.
When I write the code, I get the following error. How do I fix it?
!python3 main.py --base-dir IA2C train --config-dir config/config_ia2c_large.ini --test-mode no_test error : Loading configuration ... done. Error: File './large_grid/data/exp.net.xml' is not accessible (No such file or directory). Quitting (on error). Traceback (most recent call last): File "main.py", line 229, in
train(args)
File "main.py", line 93, in train
env = init_env(config['ENV_CONFIG'])
File "main.py", line 61, in init_env
return LargeGridEnv(config, port=port)
File "/content/drive/My Drive/traffic_signal_controll/deeprl_signal_control/envs/large_grid_env.py", line 68, in init
super().init(config, output_path, is_record, record_stat, port=port)
File "/content/drive/My Drive/traffic_signal_controll/deeprl_signal_control/envs/env.py", line 109, in init
self._init_nodes()
File "/content/drive/My Drive/traffic_signal_controll/deeprl_signal_control/envs/env.py", line 209, in _init_nodes
for node_name in self.sim.trafficlight.getIDList():
File "/usr/local/lib/python3.7/dist-packages/traci/domain.py", line 196, in getIDList
return self._getUniversal(tc.TRACI_ID_LIST, "")
File "/usr/local/lib/python3.7/dist-packages/traci/domain.py", line 172, in _getUniversal
return _parse(self._retValFunc, varID, self._getCmd(varID, objectID, format, values))
File "/usr/local/lib/python3.7/dist-packages/traci/domain.py", line 177, in _getCmd
r = self._connection._sendCmd(self._cmdGetID, varID, objID, format, values)
File "/usr/local/lib/python3.7/dist-packages/traci/connection.py", line 181, in _sendCmd
return self._sendExact()
File "/usr/local/lib/python3.7/dist-packages/traci/connection.py", line 91, in _sendExact
raise FatalTraCIError("connection closed by SUMO")
traci.exceptions.FatalTraCIError: connection closed by SUMO