Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Knack error when I run azdev linter #243

Open
qwordy opened this issue Mar 23, 2021 · 0 comments
Open

Knack error when I run azdev linter #243

qwordy opened this issue Mar 23, 2021 · 0 comments

Comments

@qwordy
Copy link

qwordy commented Mar 23, 2021

A weird error when I run azdev linter

cli.knack.cli: 'NoneType' object has no attribute 'startswith'
Traceback (most recent call last):
  File "c:\users\yfy\work\env\lib\site-packages\knack\cli.py", line 233, in invoke
    cmd_result = self.invocation.execute(args)
  File "c:\users\yfy\work\env\lib\site-packages\knack\invocation.py", line 225, in execute
    cmd_result = parsed_args.func(params)
  File "c:\users\yfy\work\env\lib\site-packages\knack\commands.py", line 148, in __call__
    return self.handler(*args, **kwargs)
  File "c:\users\yfy\work\env\lib\site-packages\knack\commands.py", line 255, in _command_handler
    result = op(client, **command_args) if client else op(**command_args)
  File "c:\users\yfy\work\azure-cli-dev-tools\azdev\operations\linter\__init__.py", line 118, in run_linter
    create_invoker_and_load_cmds_and_args(az_cli)
  File "c:\users\yfy\work\azure-cli\src\azure-cli-core\azure\cli\core\file_util.py", line 76, in create_invoker_and_load_cmds_and_args
    invoker.commands_loader.load_arguments()
  File "c:\users\yfy\work\azure-cli\src\azure-cli-core\azure\cli\core\__init__.py", line 490, in load_arguments
    c.argument('resource_group_name', resource_group_name_type)
  File "c:\users\yfy\work\azure-cli\src\azure-cli-core\azure\cli\core\commands\parameters.py", line 371, in argument
    if not self._applicable():
  File "c:\users\yfy\work\env\lib\site-packages\knack\arguments.py", line 153, in _applicable
    return self.command_loader.cli_ctx.invocation.data['command_string'].startswith(self.command_scope)
AttributeError: 'NoneType' object has no attribute 'startswith'

Version
knack, 0.8.0rc2
azdev, 0.1.29

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant