Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Using default Python env fails when looking for config

Open
#355 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
45/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
python
Domain
cli, devtools

Research direction

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.

Written by the indexing model from the issue text.

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).

pip install --upgrade pip
pip install azdev
azdev setup
Traceback (most recent call last):
  File "/home/codespace/.python/current/bin/azdev", line 8, in <module>
    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

Dominant language
Python
Stars
91
Forks
134
Avg merge
2h 51m
Merged PRs (30d)
1

Getting set up

We have not checked this project's setup files yet. Start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Azure/azure-cli-dev-tools

All issues in Azure/azure-cli-dev-tools

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.