Skip to content

Odd traceback error when a variable is not defined #2933

Open

Description

@gonzalalGFM

Morning!
We're using the rescue people example and my students are encoutering a kind of odd behaviour in the tracebacks. For instace, if at some point in the code you are using a variable that is not already assigned, instead of launching the common error in python:
line X: Undefined variable 'var' (undefined-variable)
It throughs this kind of error:
line 7: Module 'cv2' has no 'CascadeClassifier' member (no-member)
line 52: Module 'cv2' has no 'cvtColor' member (no-member)
line 52: Module 'cv2' has no 'COLOR_BGR2GRAY' member (no-member)
line 58: Module 'cv2' has no 'rectangle' member (no-member)
Leading to check the import of the libraries when the actual error is not indicated.

Activity

  1. deleted a comment from YashShukla925 on Jan 31, 2025
  2. javizqh commented on Jan 31, 2025

    @javizqh
    Member

    We are aware of this problem, but we have not been able to solve it because the traceback is being generated by Ros. The only solution currently is to read properly the error traceback and find the real error

  3. Suhani370 commented on Feb 1, 2026

    @Suhani370
  4. javizqh commented on Feb 1, 2026

    @javizqh
    Member

    Please, before commenting on an issue try to understand how Robotics Academy works.

    Your solutions are impossible to apply in our architecture.

  5. Shubham-Padkonde commented on Oct 27, 2026

    @Shubham-Padkonde
    Contributor

    Could I take a current-version investigation of this issue through the normal RoboticsAcademy stack? I have set up and tested the humble-devel development stack, but have not reproduced this Rescue People case yet.

    I would capture the editor input, the raw diagnostics produced inside the exercise's ROS environment, the RAM linter output and the code-analysis response shown by the frontend. Comparing an undefined-variable case with and without the cv2 calls should help locate where the relevant diagnostic becomes obscured. I would keep the exercise launch and normal execution path intact and provide the version details and a reproduction video.

    If this investigation is still useful and available, please assign it to me or confirm that scope. I will report the evidence before proposing a change.

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions