Azure / Azure/azure-cli-dev-tools
Using default Python env fails when looking for config
- Lenguaje dominante
- Python
- Estrellas
- 91
- Forks
- 134
- Merge medio
- 2 h 51 min
- PR fusionados (30 d)
- 1
Descripción
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
Guía de contribución
No hay ninguna guía de contribución indexada para este repositorio
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- python
- Área
- cli, devtools
- Tipo de issue
- Error
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Estado de actividad
- Estancado
- Claridad
- Bastante claro
- Aptitud para principiantes
- 45/100