Unresolved library

Hello,
I am new to RobotFramework, I work with Pycharm IDE and I don’t understand why my .resource files don’t recognize my own libraries in my project :

File /tmp_users/${USER}/EnvAuto/Supervisor/v1/resources/keywords/Cible.resource:

*** Settings ***
Library %{RESOURCES_PATH}/libraries/TargetKeywords.py

This last line is underlined in red in my case, like the Robocorp plug-in doesn’t succeed to import my library while my test works so is not a real error. It’s seems to be a display error because the plug-in is not well configured. When I put my mouse on the line, I have this error:

Unresolved library: %{RESOURCES_PATH}/libraries/GeneralKeywords.py. Error generating libspec: Importing test library ‘GeneralKeywords’ failed: ModuleNotFoundError: No module named ‘v1’ Consider adding the needed paths to the “robot.pythonpath” setting and calling the “Robot Framework: Clear caches and restart” action.

RESOURCES_PATH is a variable which define the complete path of my resources folder so it’s : /tmp_users/${USER}/EnvAuto/Supervisor/v1/resources

The path I write is correct because as I said it works but can you tel me what can I configure in the settings in Pycharm environment to fix this error and so to have a functional environment?

Because I don’t understand why the plug-in recognizes external library which are generated in libspecs folder and not mine …

Thanks :pray:

Did you tried to use $ instead of % ?

Library ${RESOURCES_PATH}/libraries/TargetKeywords.py

Oh good suggestion, I didn’t think about it !
It’s better because now the colours appear and the line is not fully uderlined anymore since I wrote :

Library ${RESOURCES_PATH}/libraries/TargetKeywords.py

However Pycharm still underlines RESOURCES_PATH and I have this error now :
Unresolved library: ${RESOURCES_PATH}/libraries/TargetKeywords.py. Unable to statically resolve variable: ${RESOURCES_PATH}. Please set the RESOURCES_PATH value in robot.variables.

Do you known where is the robot.variables file ? Do I have to create it ? I think that now if I can apply the suggestion it will solve my problem

Thank you for your help HelloGuilherme66 :slight_smile: