Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [sumo-user] Assert Error in traci method

Hi,
I suppose you are using this input:
https://github.com/LucasAlegre/sumo-rl ? If I start a similar script
here it works just fine.
Here is my code:

#!/usr/bin/env python
from __future__ import print_function
from __future__ import absolute_import
import os
import sys

sys.path.append(os.path.join(os.environ.get("SUMO_HOME", SUMO_HOME),
"tools"))
import traci  # noqa
import sumolib  # noqa

traci.start([sumolib.checkBinary('sumo'), '-n', '4x4.net.xml'])
ts_ids = traci.trafficlight.getIDList()
print(ts_ids)
traci.trafficlight.getRedYellowGreenState(ts_ids[0])
programs = traci.trafficlight.getAllProgramLogics(ts_ids[0])
traci.close()

Can you try this one with your setup?
Can you report your platform and your sumo version?

Best regards,
Michael

Am 14.10.21 um 12:33 schrieb Akhlaq Ahmed:
> 
> 
> ------------------------------------------------------------------------
> *From:* Akhlaq Ahmed
> *Sent:* Thursday, October 14, 2021 3:29 PM
> *To:* sumo-dev@xxxxxxxxxxx <sumo-dev@xxxxxxxxxxx>
> *Subject:* Assert Error in traci method
>  
> Hi, I hope you all be doing good, I am a student at a university and I
> am working on a research project related to Urban traffic optimization.
> I am using SUMO for the simulation.
> 
> When I am trying to use the following method:
> 
> traci.trafficlight.getCompleteRedYellowGreenDefinition(ts_id[0])
> 
> I am getting an 
> 
> AssertionError
> 
> 
> I have searched internet but didn't found a solution
> 
> I have attached the related files with this email, thank you!
> 
> 
> 
> _______________________________________________
> sumo-user mailing list
> sumo-user@xxxxxxxxxxx
> To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/sumo-user
> 



Back to the top