Azure / Azure/azure-cli-dev-tools

Using default Python env fails when looking for config

オープン
#355 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
Python
スター
91
フォーク
134
平均マージ
2時間 51分
マージ済み PR(30日)
1

説明

Found an edge case when I went and skipped some of the setup steps, and did not create a dedicated Python env (particularly while creating a docker container that is already dedicated to the project).

```shell
pip install --upgrade pip
pip install azdev
azdev setup
```

```
Traceback (most recent call last):
File "/home/codespace/.python/current/bin/azdev", line 8, in
sys.exit(main())
File "/usr/local/python/3.10.4/lib/python3.10/site-packages/azdev/__main__.py", line 39, in main
config_dir=get_azdev_config_dir())
File "/usr/local/python/3.10.4/lib/python3.10/site-packages/azdev/utilities/config.py", line 24, in get_azdev_config_dir
_, env_name = os.path.splitdrive(get_env_path())
File "/usr/local/python/3.10.4/lib/python3.10/posixpath.py", line 134, in splitdrive
p = os.fspath(p)
TypeError: expected str, bytes or os.PathLike object, not NoneType
```

https://github.com/Azure/azure-cli-dev-tools/blob/eee6d32a6653d639d01a23481063675f175e8b41/azdev/utilities/config.py#L24

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

調査の方向性

Start with azdev/utilities/config.py at get_azdev_config_dir and get_env_path, then reproduce the reported pip install and azdev setup commands in a default Python environment. Done means azdev setup no longer raises the NoneType traceback when no dedicated environment was created.

索引モデルが issue の本文から書いたものです。

評価

技術スタック
python
領域
cli, devtools
issue の種類
バグ
難易度
2/5
見積もり時間
1〜3時間
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
45/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。