Azure / Azure/azure-devops-cli-extension

'NoneType' object has no attribute 'lower'

Open
#1,345 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
682
Forks
278
Avg merge
3d 23h
Merged PRs (30d)
3

Description

### **This is autogenerated. Please review and update as needed.**

## Describe the bug

**Command Name**
`az devops invoke
Extension Name: azure-devops. Version: 0.26.0.`

**Errors:**
```
The command failed with an unexpected error. Here is the traceback:
'NoneType' object has no attribute 'lower'
Traceback (most recent call last):
File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\knack/cli.py", line 233, in invoke
File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/__init__.py", line 663, in execute
File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/__init__.py", line 726, in _run_jobs_serially
File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/__init__.py", line 718, in _run_job
File "C:\Users\robu\.azure\cliextensions\azure-devops\azext_devops\dev\common\exception_handler.py", line 31, in azure_devops_exception_handler
reraise(*sys.exc_info())
File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\six.py", line 719, in reraise
File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/__init__.py", line 697, in _run_job
File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/__init__.py", line 333, in __call__
File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/command_operation.py", line 121, in handler
File "C:\Users\robu\.azure\cliextensions\azure-devops\azext_devops\dev\team\invoke.py", line 88, in invoke
if (resource.lower() == resource_location.resource_name.lower() and
AttributeError: 'NoneType' object has no attribute 'lower'
```

## To Reproduce:
I'm trying to run the following GET to return the list of pipelines.

- `az devops invoke --http-method GET --org https://dev.azure.com/myorg --area pipelines --route-parameters project=ProjectName --api-version 7.0`

## Expected Behavior

Return list of pipelines

## Environment Summary
```
Windows-10-10.0.22621-SP0
Python 3.10.8
Installer: MSI

azure-cli 2.45.0

Extensions:
azure-devops 0.26.0

Dependencies:
msal 1.20.0
azure-mgmt-resource 21.1.0b1
```
## Additional Context

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.