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

[Bug]: Better module error reporting #2072

Open
billreynolds007 opened this issue Apr 27, 2024 · 2 comments
Open

[Bug]: Better module error reporting #2072

billreynolds007 opened this issue Apr 27, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@billreynolds007
Copy link

What happened?

This message
"Please install openai as a dependency with, e.g. yarn add openai"
can be extremely misleading.
Kindly change chromadb.cjs line 3070'ish to include the full stack dump to be much more useful.
It is a fatal error so the more information provided the better.
console.log(e);
throw new Error(
"Please install openai as a dependency with, e.g. yarn add openai"
);

Versions

Chroma 0.5.0

Relevant log output

NA
@billreynolds007 billreynolds007 added the bug Something isn't working label Apr 27, 2024
@tazarov
Copy link
Contributor

tazarov commented Apr 29, 2024

@billreynolds007, Do you have a suggestion for the error that will make it more user-friendly?

To clarify, this error is thrown by Chroma whenever you try to use the OpenAI embedding function but do not have the dependency required. It is a rethrow from an import error to let the user know they need additional dependency and how to install it.

@billreynolds007
Copy link
Author

billreynolds007 commented Apr 29, 2024

I encountered that error and did the one thing it said and still ran into the same static message. At a minimum please include the original exception's message because the cause may vary depending on the runtime environment. I dumped the entire stack to get a clue on what steps other than 'yarn add openai' to attempt to take. It does not need to be the whole stack. A little bit more feedback would be useful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants