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: display explicit error message when model not downloaded #156

Merged
merged 1 commit into from
Jul 28, 2021

Conversation

benoitgoujon
Copy link
Contributor

Closes #148

Better error message when the model has not been downloaded.

Copy link
Contributor

@hugovasselin hugovasselin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot for the fix! The mocked test is awesome :)
I just have a small suggestion on the error message itself.

Thanks again for your help @benoitgoujon

nlpretext/token/tokenizer.py Outdated Show resolved Hide resolved
For a couple of functionalities, we need to load a spacy model that is not included by default. The developer has to download it manually in addition to the package. If the model is not present locally, an error will occur. The message is not meaningful. This commit will make it more explicit.
@benoitgoujon benoitgoujon force-pushed the fix/error-model-not-downloaded branch from 254c4d1 to 16dd82f Compare July 28, 2021 09:21
@hugovasselin hugovasselin merged commit d424a5a into master Jul 28, 2021
@hugovasselin hugovasselin deleted the fix/error-model-not-downloaded branch July 28, 2021 09:28
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.

raise an explicit error in case spaCy models are not downloaded
2 participants