pmsoltani / elsametric

0 stars 0 forks source link

elsametric cannot read environment variables #56

Closed pmsoltani closed 5 years ago

pmsoltani commented 5 years ago

Bug description

In #53, elsametric started using the environs package to access environment variables. If, however, elsametric is called from another module, environs cannot find the required .env file, unless a specific path is supplied.

Suggested solution

Replace the line

env.read_env()

inside __init__.py with the one below:

env.read_env(path=Path.cwd())

Note that it may be needed to import Path from the pathlib library.