alexmojaki / alexmojaki/futurecoder

Detect import errors for auto-installing

オープン
#182 コメント 0 件 リアクション 0 件 担当者 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 を短くまとめたダイジェスト。