-
Notifications
You must be signed in to change notification settings - Fork 415
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
find_dotenv doesn't work as expected #24
Comments
That's not intended behavior and sure we can use a fix. I'll have a look into it. Thanks for reporting. |
I see the same behaviour. Looks like find_dotenv() is broken. I tested this on both Python 2.7 and 3.5.
Based on my limited understanding, I think you want |
@voidlily @WilliamsMJ I've added a fix for the .env finding logic. It now starts finding from the python file from where it's called, then move up the directory till You can try it out by installing from latest master.
If things look, I'll make a new release on pypi. Cheers, |
Works for me 👍
|
@voidlily good catch! @theskumar that one is on me -- oops 😞 Just tested again using new master and it works for me. |
@isms no worries! I've made released v0.5.1 🎉 which contains this fix. |
What I did
What I expected
The
.env
file to be loaded properlyWhat I got
The
.env
file was not foundAdditional information
I print-debugged the code and found the following path when it walks up the directory tree
This might be from the usage of
__file__
in that module.Is this the intended behavior of
find_dotenv
?The text was updated successfully, but these errors were encountered: