I always have this red color in every file that I open, what's wrong? I use VS Code

Hi all,
I always have this red color in every file that I open, what’s wrong?
it says : "Undefined keyword: … "
did I miss something ? plugins?

I already install Robot Framework Language Server, Robot Code, and Robot-Framework-Formatter
and I have this version of RF and Python
Robot Framework 6.0.2 (Python 3.11.1 on win32)

This generally indicates to the language server not using the correct Python interpreter.

Also note that you should use either Robot Framework Language Server or Robot Code, not both. I’m not familiar with Robot-Framework-Formatter, but both RFLS and RC offer such functionality, so I would not use it with either of them.

I would suggest choosing either RFLS or RC, disable the other plugins, then Ctrl+Shift+P → Python: Select Interpreter and choose the correct one, then Ctrl+Shift+P → (RFLS or RC): Clear Cache and restart language server.

1 Like

Did you ever figure this out?

Do you get the issue with any keywords that aren’t from the Browser Library?

For me, it usually just means I don’t have the correct resource specified in the Settings section of that file (this can happen in Keyword files where it won’t cause issues when running as long as the Test file has the Resource specified). However, I have not been able to fix the issue for Browser keywords as the extension cannot generate the libspec for it. I suspect this has something to do with initializing the library.

thanks! this works