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

Handle import errors of extras modules #60

Open
dev-rinchin opened this issue Jan 24, 2023 · 1 comment
Open

Handle import errors of extras modules #60

dev-rinchin opened this issue Jan 24, 2023 · 1 comment
Labels
enhancement New feature or request no-issue-activity

Comments

@dev-rinchin
Copy link
Collaborator

dev-rinchin commented Jan 24, 2023

🚀 Feature Request

LightAutoML should inform a user about additional extras that he needs to install to avoid the import problem. Similar to:

print("Can't generate PDF report: check manual for installing pdf extras.")

warnings.warn("'nltk' - package isn't installed")

Or automatically install missing extras as in following proposal.

Proposal

try:
    from weasyprint import HTML
except ImportError:
    import pip
    pip.main(['install', '--user', 'lightautoml[pdf]'])
    from weasyprint import HTML
@dev-rinchin dev-rinchin added the enhancement New feature or request label Jan 24, 2023
@github-actions
Copy link

github-actions bot commented Apr 1, 2023

Stale issue message

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request no-issue-activity
Projects
None yet
Development

No branches or pull requests

1 participant