Importing test library 'Notepad' failed: ModuleNotFoundError

Hi all,

I am trying to make custom keyword libraries following robocorp’s best practices. But when I try to add libraries/ to PYTHONPATH and import the Notepad.py library using Library notepad I get the error:
Importing test library 'Notepad' failed: ModuleNotFoundError: No module named 'Notepad'

When I run the robot task, the keywords are loaded and the robot runs fine. So I’m not sure if this is a bug.

Here are some screenshots of my code and configuration:

Hi and welcome to the forum!

Did you already try restarting the VSCode?

yes, I tried re-installing the robocorp extensions.

Hello @avi.varma
Your code looks correct from what you’ve shown. I was wondering, in the bottom right of your VS Code window do you see a small pop-up after you made the changes, mentioning about the environment building? Usually those changes should trigger an environment build and if the build fails, it’s possible to happen what you’ve shown.

Ah thanks! I found the issue when I checked at what robot extensions I had installed: I accidentally installed RobotCode instead of RobotFramework which is made by robocorp. Installed the correct language server and the errors are gone!

3 Likes

Awesome news @avi.varma , glad it was solved! Please let us know if you encounter any other issues