Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [sumo-user] libsumo for traffic signal logic change

I can reproduce the problem now. Your PR doesn't cover the case of using non-keyword arguments. I'll build a fix.

Am Di., 9. Juli 2024 um 13:20 Uhr schrieb Sasan Amini via sumo-user <sumo-user@xxxxxxxxxxx>:
not sure if it is completely fixed because now I get the following Error:

TypeError: TraCILogic__init__() got an unexpected keyword argument 'programID'

I made a quick fix but the pull request was not accepted again:
https://api.eclipse.org/git/eca/status/gh/eclipse-sumo/sumo/15178


On Tue, Jul 9, 2024 at 7:52 AM Jakob Erdmann via sumo-user
<sumo-user@xxxxxxxxxxx> wrote:
>
> Please try again with the latest dev version. We just fixed a bug related to libsumo and the Logic constructor. https://github.com/eclipse-sumo/sumo/issues/15164#event-13427282889
>
> Am So., 7. Juli 2024 um 10:43 Uhr schrieb Sasan Amini via sumo-user <sumo-user@xxxxxxxxxxx>:
>>
>> Dear all,
>> I had a script for manipulation of tls logic using traci and since I
>> wasn't happy with the speed of the simulation, I decided to use
>> libsumo instead of traci. Everything works fine except the part where
>> I use:
>> traci.trafficlight.setProgramLogic(tlsID=key,logic=traci.trafficlight.Logic(programID='0',type=0,currentPhaseIndex=idx,phases=ps))
>> and I get an error libsumo complaining:
>> TypeError: __init__() got an unexpected keyword argument 'programID'
>>
>> I assume not all traci methods are fully defined in libsumo, am I right?
>>
>> As always, thanks for any tips,
>> Sasan
>>
>> P.S. I am using SUMO v.1.20 and also tried it on latest nightly build
>> and I only changed at the beginning of my code where I import libsumo
>> as follows:
>> import libsumo as traci (instead of import traci)
>> _______________________________________________
>> sumo-user mailing list
>> sumo-user@xxxxxxxxxxx
>> To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/sumo-user
>
> _______________________________________________
> sumo-user mailing list
> sumo-user@xxxxxxxxxxx
> To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/sumo-user
_______________________________________________
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