Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[sumo-user] Interface with SUMO from python

Hi everyone,
This is a stupid question, but I really need help...
I'm tring to interface SUMO from python. But it gives me an
FileNotFoundError.
My code is like this,

import os, sys
if 'SUMO_HOME' in os.environ:
    tools = os.path.join(os.environ['SUMO_HOME'], 'tools')
    sys.path.append(tools)
else:   
    sys.exit("please declare environment variable 'SUMO_HOME'")
##environment variable is correct

sumoBinary = "E:/_software/SUMO/bin/sumo.gui"
sumoCmd = [sumoBinary, "-c", "E:/_software/SUMO/test/hello.sumocfg"]

import sumolib
import traci
import subprocess
traci.start(sumoCmd) 
(My sumo version is 1.0.1, so I don't need to start remote port, right??)

The error is as follows
<http://sumo-user-mailing-list.90755.n8.nabble.com/file/t15/%E6%8D%95%E8%8E%B7.jpg> 

Thanks in advance,
Zheya





--
Sent from: http://sumo-user-mailing-list.90755.n8.nabble.com/


Back to the top