TypeError: 'NoneType' object is not subscriptable
See original GitHub issueWhen 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.
- ID: 226e5769-f6c8-a480-db78-727fb96348ec
- Version Independent ID: 8ee06a2a-6eda-11be-3c8e-6ad948be207e
- Content: az keyvault
- Content Source: src/azure-cli/azure/cli/command_modules/keyvault/_help.py
- Service: key-vault
- GitHub Login: @rloutlaw
- Microsoft Alias: routlaw
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (4 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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. 😄@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!