Open tuna2134 opened 1 year ago
I've encountered this a few times around the place, and last I checked, it traces back to module lookup creation in distutils. If with pip you somehow break one of your packages - or one ends up in a transient state while distutils is trying to deal with it, the creation will fail and distutils will remain forever unable to pull information from any package until the interpreter is restarted.
It's not an easy bug to reproduce, and its root cause is not possible to fix because it is caused by pip not us. But, some kind of workaround should be implemented that maybe doesn't rely on distutils if it coughs up evidence that it broke its database.
なにか必要な情報ありますか?
jishakuのバージョン情報を取得するには二つの方法があります:
① jishaku内のバージョン情報 (jishaku.version_info
, jishaku.__version__
)
② pkg_resourcesの記録されたバージョン (つまり pip show
とかで出るバージョン)
内容はほとんど同じですが、 GitHubからインストールした場合、gitハッシュとコミット数 (a1234+g1234abc.master
の部分) はもちろんパッケージに埋め込んでないので、selftestはそれを表示するには 3fd14708c6ad8d71617d03e301e96cc1359c87ae で取得方法は ① から ② になりました。
ですが、pkg_resources
はなぜかかなり敏感なもので、一瞬でも異常事態が起こったら (例えばpip
がクラッシュするとか) 内部データベースが破損されてしまい、お待ちかねの vNone
が出てしまいます。
だから、正確に言えばこれは jishaku
自体のバグじゃないけど、それでも煩わしいので修正したいです。今破損してる環境持ってないので、site-packages
のコンテンツをzipにしてアップロードできれば助かるけど、そうではない場合は自分でこの状態になるまで待つしかない。
逆に早速で直したいのであれば、site-packages
を確認して異変があるかを確かめてみてください。おそらく、~
が先頭にある (例えば ~iohttp
とか) pipの痕跡フォルダーが残っていて、それを消してインタプリタを再起動すればデータベースが無事に再構築されるはず。
Okay, I'll do after I finish exam.
Summary
When I run
jsk
root command, jishaku show me like this image.Reproduction steps
When I run jsk command.
Checklist
System information