alexmojaki / alexmojaki/futurecoder

Detect import errors for auto-installing

未关闭
#182 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
Python
星标
1.5k
派生
183
PR 合并指标
30 天内没有已合并 PR

描述

Some packages have optional dependencies that are only required for some functions. So importing the main package automatically installs it, but using it can still lead to an error. We can detect when this has happened to help users. It requires catching exceptions in `execute`, checking the caught exception as well as the chain of `__cause__` and `__context__` for `ModuleNotFoundError`, and looking at the `name` attribute. Then we tell the user to import the missing module explicitly to 'install' it.

贡献指南

这个仓库没有索引到贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。