Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix bug with .env not loading for pip installs #601

Merged
merged 2 commits into from
Jul 12, 2024

Conversation

richard-to
Copy link
Collaborator

For some reason the default load_dotenv() behavior is not working as expected for pip installs. To fix this, we update the code to explicitly search the user's current working directory.

This does not work when running in Bazel, so we still need to use load_dotenv().

Tested this by running ./scripts/pip.sh and also testing ./scripts/cli.sh.

Ref: #592

For some reason the default `load_dotenv()` behavior is not working as
expected for pip installs. To fix this, we update the code to explicitly
search the user's current working directory.

This does not work when running in Bazel, so we still need to use
`load_dotenv()`.

Tested this by running ./scripts/pip.sh and also testing
./scripts/cli.sh.
mesop/server/config.py Outdated Show resolved Hide resolved
@richard-to richard-to merged commit 81925b6 into google:main Jul 12, 2024
3 checks passed
@richard-to richard-to deleted the env-fix branch July 13, 2024 17:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants