LucasAlegre/sumo-rl

Connection closed by SUMO

SeasonedLeo opened this issue · 3 comments

Hi Everybody ,

I have been trying to setupsumo-rl but I am getting this error " Connection closed by SUMO" Snap shot attached .

I followed the process as mentioned in the document , the only difference is with how Sumo was installed /setup. Since I dont have admin rights I unzipped the zip version of sumo
64-bit zip with all extras (contains GPL code): sumo-win64extra-1.18.0.zip149 MB

then i followed theinstruction to setup sumo as mentioned in sumo-rl document . set up paths and tried running basic code, showne below and that is whaen I get this error , please help/provide directions. Thanks

import gymnasium as gym
import sumo_rl
env = gym.make('sumo-rl-v0',
                net_file='path_to_your_network.net.xml',
                route_file='path_to_your_routefile.rou.xml',
                out_csv_name='path_to_output.csv',
                use_gui=True,
                num_seconds=100000)
obs, info = env.reset()
done = False
while not done:
    next_obs, reward, terminated, truncated, info = env.step(env.action_space.sample())
    done = terminated or truncated

image

You have to replace the string "path_to_your_network.net.xml" with a string containing an actual network file. See the examples https://github.com/LucasAlegre/sumo-rl/tree/main/experiments

@LucasAlegre hello, I meet the same question, when i run dqn_big_intersection.py in experiments folder, an error occurs like below, could u help me to solve this, thanks
image

You have to adjust the path to the network file.