Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[sumo-user] module 'sumolib.net' has no attribute 'getEdge'

Hi there,

I have a problem when I try to get any information from sumolib, I have checked the sumolib document and followed the steps but I keep getting this error
module 'sumolib.net' has no attribute 'getEdge'
its same for everything, lanes, nodes, etc

I changed my code several times, removed the 'get' word and when I try to call the code I have another error
'module' object is not callable

any suggestions?

here is my simple code example:

import os, sys
import sumolib
from sumolib import net

if 'SUMO_HOME' not in os.environ:
     SUMO_HOME=os.path.join(os.sep, 'home','sumo')
     sys.path.append('SUMO_HOME')

tools = os.path.join(os.environ['SUMO_HOME'], 'tools')
sys.path.append(tools)


from sumolib import checkBinary
sumoBinary = checkBinary('sumo')
sumoBinaryGUI = checkBinary('sumo-gui')


network= sumolib.net.readNet('RL.net.xml', withInternal=True)
edges= net.getEdge('6098').getToNode().getID()
print(edges)

my error appears here: net.getEdge('6098').getToNode().getID()


Best Regards,

Mohammed Hammam
Twitter    ​. Linkedin
Tel: +974-5563-3861

Back to the top