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

**URL:** <https://forum.robotframework.org/t/i-always-have-this-red-color-in-every-file-that-i-open-whats-wrong-i-use-vs-code/5228>\
**Category:** Tools\
**Created:** [31 January 2023 08:55 UTC](https://forum.robotframework.org/t/i-always-have-this-red-color-in-every-file-that-i-open-whats-wrong-i-use-vs-code/5228 "2023-01-31T08:55:40Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![miraraudhotul](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.robotframework.org/miraraudhotul/32/2275_2.png) [@miraraudhotul](https://forum.robotframework.org/u/miraraudhotul)\
**Post date:** [31 January 2023 08:55 UTC](https://forum.robotframework.org/t/i-always-have-this-red-color-in-every-file-that-i-open-whats-wrong-i-use-vs-code/5228/1 "2023-01-31T08:55:40Z")

</div>

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)

 ![image](https://europe1.discourse-cdn.com/flex005/uploads/robotframework1/original/2X/8/8d7c50f82b22ccab61afd066e0e49663d1ae4672.png)

---

<div class="post-metadata">

**Author:** ![robinmackaij](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.robotframework.org/robinmackaij/32/126_2.png) [@robinmackaij](https://forum.robotframework.org/u/robinmackaij)\
**Post date:** [9 February 2023 20:02 UTC](https://forum.robotframework.org/t/i-always-have-this-red-color-in-every-file-that-i-open-whats-wrong-i-use-vs-code/5228/2 "2023-02-09T20:02:31Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Silken](https://avatars.discourse-cdn.com/v4/letter/s/e8c25b/32.png) [@Silken](https://forum.robotframework.org/u/Silken)\
**Post date:** [9 March 2023 22:15 UTC](https://forum.robotframework.org/t/i-always-have-this-red-color-in-every-file-that-i-open-whats-wrong-i-use-vs-code/5228/3 "2023-03-09T22:15:40Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![miraraudhotul](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.robotframework.org/miraraudhotul/32/2275_2.png) [@miraraudhotul](https://forum.robotframework.org/u/miraraudhotul)\
**Post date:** [12 May 2023 02:14 UTC](https://forum.robotframework.org/t/i-always-have-this-red-color-in-every-file-that-i-open-whats-wrong-i-use-vs-code/5228/4 "2023-05-12T02:14:42Z")

</div>

thanks! this works

---

<div class="post-metadata">

**Author:** ![kamichal](https://avatars.discourse-cdn.com/v4/letter/k/b5a626/32.png) [@kamichal](https://forum.robotframework.org/u/kamichal)\
**Post date:** [28 January 2025 13:58 UTC](https://forum.robotframework.org/t/i-always-have-this-red-color-in-every-file-that-i-open-whats-wrong-i-use-vs-code/5228/5 "2025-01-28T13:58:14Z")

</div>

> [@robinmackaij](#):
>
> This generally indicates to the language server not using the correct Python interpreter

How make it correct if I use devcontainer?  
My robot libraries are installed from a separate private package in a devcontainer.  
I hope (but strongly doubt) that it is possible to make the language server using the python interpreter and my libraries from the devcontainer.

Doubling interpreter environments sounds silly. Installation of packages requires accessing a private package index, where access is protected with a token.

Is there a good way to solve it?

---

<div class="post-metadata">

**Author:** ![robinmackaij](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.robotframework.org/robinmackaij/32/126_2.png) [@robinmackaij](https://forum.robotframework.org/u/robinmackaij)\
**Post date:** [28 January 2025 14:13 UTC](https://forum.robotframework.org/t/i-always-have-this-red-color-in-every-file-that-i-open-whats-wrong-i-use-vs-code/5228/6 "2025-01-28T14:13:28Z")

</div>

If you’re in a devcontainer, `Ctrl+Shift+P` → `Python: Selelct Interpreter` should allow you to select the Python interpreter (either system or venv, depending on your workflow). Once you’ve done that, a `pip list` in the shell should show you the expected packages and the language server should pick everything up.
