Library not being recognized using Red
por84 opened this issue · 3 comments
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
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
sorry yes, will edit my question, Python 3.8
and
robotframework==3.1.2
Just to add a bit more info, see:
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