Pabot does not read imports

Hi. When I run my tests in Pycharm with command ‘python -m pabot.pabot --processes 10 tests/test_suites1’ everything works, but when I use the same command using cmd I get errors for every import ‘[ ERROR ] Error in file ’ ’ on line 19: Resource file ‘.robot’ does not exist.’ I’ve activated virtual env.

robotframework 6.1.1
robotframework-pabot 2.16.0

Hi Tom,

FYI - I don’t use Pycharm myself, so I may be wrong, take what I say here with a grain of salt.

If I remember correctly Pycharm uses a python Virtual Environment (venv), so when you run using cmd outside Pycharm you need to either:

  • switch to the same venv as Pycharm uses
  • install the libraries in your non-venv python environment

Hope that helps,

Dave.

Thanks for your answer. I’ve solved the problem. It helped to use ‘set PYTHONPATH=path/to/working/directory’ before running script.

1 Like