I've checked it again and it seems that it is not a bug. If you extract the
program logic using traci (traci.trafficlight.getAllProgramLogics) (and
store it for example in a pickle) then you cannot use libsumo and
setProgramLogic(). The reason is that the type of program logic returned by
traci (traci._trafficlight.Logic) is different compared to the one returned
by libsumo (libsumo.libsumo.TraCILogic) (which is SwigPyObject and it
cannot be pickled). That's why libsumo throws a typing error.

Στις Τετ 21 Ιουν 2023 στις 10:19 π.μ., ο/η manos kampitakis <
[email protected]> έγραψε:

> Hi all,
>
> Since I updated sumo to v1.17 when I use traci everything works fine in my
> script but when I use libsumo I get the following error in this line of
> code self.sumo.trafficlight.setProgramLogic(self.tls_id,
> self.program_logic) => TypeError: in method 'trafficlight_setProgramLogic',
> argument 2 of type 'libsumo::TraCILogic const &'. I guess that it should be
> a bug because traci works fine.
>
> Best regards,
> Manos
>
_______________________________________________
sumo-user mailing list
[email protected]
To unsubscribe from this list, visit 
https://www.eclipse.org/mailman/listinfo/sumo-user

Reply via email to