question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

TypeError: 'NoneType' object is not subscriptable

See original GitHub issue

When running az keyvault set-policy --name $kv_name --resource-group $rg_name --secret-permissions set get list delete I receive the following error. The word “subscriptable” is not in the Merriam Webster dictionary. What does this error code refer to?

The command failed with an unexpected error. Here is the traceback:

'NoneType' object is not subscriptable
Traceback (most recent call last):
  File "/opt/az/lib/python3.6/site-packages/knack/cli.py", line 206, in invoke
    cmd_result = self.invocation.execute(args)
  File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 603, in execute
    raise ex
  File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 661, in _run_jobs_serially
    results.append(self._run_job(expanded_arg, cmd_copy))
  File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 654, in _run_job
    six.reraise(*sys.exc_info())
  File "/opt/az/lib/python3.6/site-packages/six.py", line 693, in reraise
    raise value
  File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 631, in _run_job
    result = cmd_copy(params)
  File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 306, in __call__
    return self.handler(*args, **kwargs)
  File "/opt/az/lib/python3.6/site-packages/azure/cli/core/__init__.py", line 485, in default_command_handler
    return op(**command_args)
  File "/opt/az/lib/python3.6/site-packages/azure/cli/command_modules/keyvault/custom.py", line 448, in set_policy
    object_id = _object_id_args_helper(cmd.cli_ctx, object_id, spn, upn)
  File "/opt/az/lib/python3.6/site-packages/azure/cli/command_modules/keyvault/custom.py", line 433, in _object_id_args_helper
    object_id = _get_object_id(graph_client, spn=spn, upn=upn)
  File "/opt/az/lib/python3.6/site-packages/azure/cli/command_modules/keyvault/custom.py", line 214, in _get_object_id
    return _get_object_id_from_subscription(graph_client, subscription)
  File "/opt/az/lib/python3.6/site-packages/azure/cli/command_modules/keyvault/custom.py", line 197, in _get_object_id_from_subscription
    if subscription['user']:
TypeError: 'NoneType' object is not subscriptable

To open an issue, please run: 'az feedback'

Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
bim-msftcommented, May 27, 2020

FYI: subscriptable is a Python term: https://stackoverflow.com/questions/216972/what-does-it-mean-if-a-python-object-is-subscriptable-or-not . It’s not in the Merriam Webster dictionary. 😄

1reaction
bim-msftcommented, May 28, 2020

@SeaDude I believe this product is nearly abadoned… because the last commit was Apr 2019, and tons of issues do not have been assigned and resolved. Anyway, I will create a new issue to let them know the outdated cli things. Thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

TypeError: 'NoneType' object is not subscriptable
NoneType is the type of the None object which represents a lack of value, for example, a function that does not explicitly return...
Read more >
TypeError: 'NoneType' object is not subscriptable in Python
The Python "TypeError: 'NoneType' object is not subscriptable" occurs when we try to access a None value at a specific index. To solve...
Read more >
Python Math - TypeError: 'NoneType' object is not subscriptable
The reason that lista gets set to None is because the return value of list.sort() is None ... it does not return a...
Read more >
[Solved] TypeError: 'NoneType' Object is Not Subscriptable
The error, NoneType object is not subscriptable, means that you were trying to subscript a NoneType object. This resulted in a type error....
Read more >
Python TypeError: 'NoneType' object is not subscriptable
The “TypeError: 'NoneType' object is not subscriptable” error is common if you assign the result of a built-in list method like sort() ,...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found