Skip to content

is "GetControlledLinks(str).Content.NumberofSignals;" valid? #27

Open

Description

@ObKress

getting " InvalidOperationException: Sequence contains no elements " error when trying to call

var linkcount = client.TrafficLight.GetControlledLinks(newjunction.name).Content.NumberOfSignals;

Not my code. It seems to me that possibly the .NumberofSignals is not a defined value.
The original code is trying to return the controlledlinks.length integer value from SUMO, I believe.

Activity

  1. ObKress commented on Aug 9, 2022

    @ObKress
    Author

    Source code was written to work with sumo 1.01.

  2. shijasck11 commented on Jan 6, 2024

    @shijasck11

    Did you find a solution for this? I have the same issue.

  3. mennowo commented on Mar 3, 2025

    @mennowo
    Contributor

    In case someone found a fix for this, feel free to do a PR!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions