Python - Path definition ST.PROJECT_ROOT = os.environ['PROJECT_ROOOT']

Asked

Viewed 13 times

0

I’m trying to spin a test project, but it always makes that mistake:

ImportError while loading conftest 'D:\_Automation\_Projects_automation\Automation_Poco_Pytest\Automation_runner\cases\conftest.py'.
..\conftest.py:16: in <module>
    ST.PROJECT_ROOT = os.environ['PROJECT_ROOT']
C:\Users\tf.dias\AppData\Local\Programs\Python\Python36\lib\os.py:669: in __getitem__
    raise KeyError(key) from None
E   KeyError: 'PROJECT_ROOT'

I had put in PROJECT_ROOT the name of the project, but it didn’t work. This part of configuration is trying to learn now. There I am trying to build a project that uses, Pytest, Python, with Allure.

  • 1

    Python is pulling this value from the environment variables. You have somehow configured these variables in your environment?

  • Yes, it’s set up, but I don’t know why I don’t recognize

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.