RasaException: Error when trying to expand the environment variables

When I moved my values to .env file. I trained again my rasa project without error; but, when I run the project it launches:

 in env_var_constructor
    raise RasaException(
rasa.shared.exceptions.RasaException: Error when trying to expand the environment variables in '${DB_HOST}'. Please make sure to also set these environment variables: '['${DB_HOST}']'.
RasaException: Error when trying to expand the environment variables in '${DB_HOST}'. Please make sure to also set these environment variables: '['${DB_HOST}']'.

My .env file structure is:

DB_HOST=<some string value>
DB_USER=<some string value>
DB_PASSWORD=<some string value>
DB_DATABASE=<some string value>

In endpoints.yml I update the tracker_store with this:

tracker_store:
    type: mongod
    url: ${DB_HOST}
    username: ${DB_USER}
    password: ${DB_PASSWORD}
    db: ${DB_DATABASE}

What I have to do to resolve this error?

To resolve this problem is quit of the venv or pipenv and re-join to the environment and train rasa again.