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

set ./.env in load_dotenv #14

Merged
merged 1 commit into from
Jul 17, 2023
Merged

set ./.env in load_dotenv #14

merged 1 commit into from
Jul 17, 2023

Conversation

juananpe
Copy link
Contributor

Fixes #13

@shroominic
Copy link
Owner

Is this needed? I thought by default it is just checking the CWD?

@juananpe
Copy link
Contributor Author

In my tests, it seems that it is really needed.

It is true that load_dotenv() tries to load the .env file from the CWD, but as it is inside the codeinterpreterapi/config.py file (class CodeInterpreterAPISettings) it will try to load it from /lib/python3.10/site-packages/codeinterpreterapi/ (where the config.py is located) instead of from the current directory of the script that you are trying to run.

I have recorded a short video illustrating my point:
https://youtu.be/30Lj53qESiI

@shroominic
Copy link
Owner

Okay nice LGTM

@shroominic shroominic merged commit d871fbf into shroominic:main Jul 17, 2023
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.

.env not found in current directory
2 participants