Skip to content

Library not being recognized using Red #443

@por84

Description

@por84

I am having an issue, similar to:
#245

Any library we create in our framework is recognized by Python classes fine, and the functions in the library are recognized by Red, but we are still getting the red line under the library import.

I add the library (mylib) to red.xml
and its appearing in ‘Robot Referenced Libraries’ without an error.
But then in my test file mytests.robot
I add:
Library framework.services.mylib WITH NAME mylib

and its not recognized (appears with the red line under it), but still actually works when I use it in my tests.
I use Python 3.8 on Ubuntu
Any idea what could be wrong?

I tired the ctrl+1 to auto search for the library and I just get:

Status: Not added to project configuration
Source: /home/myname/git/project-tests/framework/services/mylib/init.py
Importer: /home/myname/git/project-tests/test_cases/robotTest/Test_Cases/functional/american/mytests.robot
Additional info: RED was unable to find class 'framework.services.mylib' inside 'file:///home/myname/git/project-tests/framework/services/mylib/init.py' module.

Note external Library's are fine like:
Library String

Thanks

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