Azure / Azure/azure-cli-dev-tools

Using default Python env fails when looking for config

Open
#355 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
91
Forks
134
Avg merge
2h 51m
Merged PRs (30d)
1

Description

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

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.