Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Library not being recognized using Red #443

Open
por84 opened this issue Jun 21, 2022 · 3 comments
Open

Library not being recognized using Red #443

por84 opened this issue Jun 21, 2022 · 3 comments

Comments

@por84
Copy link

por84 commented Jun 21, 2022

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

@michalanglart
Copy link
Collaborator

Robot 3.8 ? Is it Python 3.8?

Please bear in mind RED was not released in last 2 years and newest version supports RF 3.0-3.2 only

@por84
Copy link
Author

por84 commented Jun 27, 2022

sorry yes, will edit my question, Python 3.8
and
robotframework==3.1.2

@por84
Copy link
Author

por84 commented Jul 7, 2022

Just to add a bit more info, see:
image

here you can see that the 'Robot Referenced Libraries' has my library and my keyword is visable.
I can also run my test 'My Test Case Here' successfully but for some reason im still getting the red line on line 4 and the error warning on line 11 in the screenshot. Any idea wny that might be?

thanks again in advance

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants