Import "RPA.Browser.Selenium" could not be resolved Pylance

i m writing python bot and it works well
The only issue that Pylance can’t resolve RPA libraries.
tried to google around but not luck yet.

Anyone fact to this issue or any suggestion?

image

If you are using Visual Studio Code with our extensions then you could use command Set Pythonpath based on robot.yaml . I am guessing that pylance gives that warning because your Python environment is not the one determined by robot.yaml (ie. conda.yaml).

1 Like

thanks @mika
i set pythonpath from pylance and it works

1 Like

I am having the exact same problem but don’t know where to “Set Pythonpath based on robot.yaml”, would you please give me instructions on how to do this?

Thanks and regards!

Hi,
Yeah we need to guide this better somehow in the extension, but in the mean time VS Code’s Command Palette is your friend:

  • CTRL + SHIFT + P to open the command palette and just start typing what you are looking for
  • In this case typing: Robocorp shows all of our commands, but typing ´pythonpath´ should get you directly on the correct command (depends a bit on what other extensions are installed)

Thanks you very much, this actually worked for me.

Regards and happy new year!