azure-cli-dev-tools icon indicating copy to clipboard operation
azure-cli-dev-tools copied to clipboard

Profile fails in silly way

Open paulgmiller opened this issue 5 years ago • 1 comments

When I run azdev test I get

 File "/home/pmiller/azure-cli-extensions/penv/lib/python3.8/site-packages/azdev/operations/testtool/__init__.py", line 329, in _get_test_index
    test_index = _discover_tests(profile)
  File "/home/pmiller/azure-cli-extensions/penv/lib/python3.8/site-packages/azdev/operations/testtool/__init__.py", line 200, in _discover_tests
    profile_split = profile.split('-')
TypeError: a bytes-like object is required, not 'str'

This seems to be because of def current_profile(): return cmd('az cloud show --query profile -otsv', show_stderr=False).result

When I run az cloud show --query profile -otsv

I get File "/home/pmiller/azure-cli-extensions/penv/lib/python3.8/site-packages/pkg_resources/__init__.py", line 777, in resolve raise DistributionNotFound(req, requirers) pkg_resources.DistributionNotFound: The 'azure-cli==2.14.0' distribution was not found and is required by the application This is all in a fairly new/clean venv.

paulgmiller avatar Nov 18 '20 05:11 paulgmiller

I can get by this by doing /usr/bin/az cloud show --query profile -otsv latest and using --profile latest in azdev test but it's not a great experience.

paulgmiller avatar Nov 18 '20 06:11 paulgmiller