Comments (9)
az config set core.login_experience_v2=off
Could help to resolve errors, until it's fixed.
from azure-cli.
Hi @ronttizz
Find similar issue #16946.
Issue title | A stacktrace with a disorienting message is shown for az apim api import |
Create time | 2021-02-16 |
Comment number | 3 |
Possible solution:
The error message "can only concatenate str (not "NoneType") to str" is shown in both issues. In the existing issue, the error message is caused by not specifying the --specification-format parameter. Similarly, in the new issue, the error message is caused by a similar issue. The solution to the new issue is to specify the --specification-format parameter. You can check all the valid values for the --specification-format parameter by running "az apim api import -h".
Please confirm if this resolves your issue.
from azure-cli.
Confirmed that @v-starodubov's suggestion allows me to successfully login. Would be nice if this was fixed ASAP though since it's a serious regression.
from azure-cli.
Same issue for our on-premises or hybrid environment. After the work-around for this different issue (#28997):
az account clear
az config set core.enable_broker_on_windows=false
I get the error in this GitHub issue above. However, I still end up being logged into the account. It just throws the error.
from azure-cli.
Thank you for opening this issue, we will look into it.
from azure-cli.
File "/opt/homebrew/Cellar/azure-cli/2.61.0/libexec/lib/python3.11/site-packages/azure/cli/command_modules/profile/_subscription_selector.py", line 52, in _format_subscription_table
'Tenant': highlight_text(self._get_tenant_string(sub), is_default)
indicates self._get_tenant_string(sub)
returned None
:
According to the log provided by @m1iktea in #29241 (comment), https://management.azure.com/tenants?api-version=2022-12-01
API returned
cli.azure.cli.core.sdk.policies: {"value":[{"id":"/tenants/122f6959-7492-42d8-8cf5-f9233ac18c4f","tenantId":"122f6959-7492-42d8-8cf5-f9233ac18c4f","tenantCategory":"Home"}]}
displayName
property is missing from the response JSON. This contradicts the ARM public document https://learn.microsoft.com/en-us/rest/api/resources/tenants/list?view=rest-resources-2022-12-01
@ronttizz, @v-starodubov, @XhmikosR, @TheOnlyWei, could you also check the --debug
log and share the HTTP trace of https://management.azure.com/tenants?api-version=2022-12-01
API call?
from azure-cli.
@jiasli sure
cli.azure.cli.core.sdk.policies: Request URL: 'https://management.azure.com/tenants?api-version=2022-12-01'
...
cli.azure.cli.core.sdk.policies: Response content:
cli.azure.cli.core.sdk.policies: {"value":[{"id":"/tenants/d2012c1c-e56f-4ea4-ac1a-9d94f1c563c6","tenantId":"d2012c1c-e56f-4ea4-ac1a-9d94f1c563c6","tenantCategory":"Home"}]}
And error has dropped after the subscription request, may be related also 🤔
cli.azure.cli.core.sdk.policies: Request URL: 'https://management.azure.com/subscriptions?api-version=2022-12-01'
...
cli.azure.cli.core.sdk.policies: Response content:
cli.azure.cli.core.sdk.policies: {"value":[{"id":"/subscriptions/c8ed0cd4-dc57-41a9-ab2c-54beec7b9510","authorizationSource":"RoleBased","managedByTenants":[],"subscriptionId":"c8ed0cd4-dc57-41a9-ab2c-54beec7b9510","tenantId":"d2012c1c-e56f-4ea4-ac1a-9d94f1c563c6","displayName":"Microsoft Azure Sponsorship","state":"Enabled","subscriptionPolicies":{"locationPlacementId":"Public_2014-09-01","quotaId":"Sponsored_2016-01-01","spendingLimit":"Off"}}],"count":{"type":"Total","value":1}}
cli.azure.cli.core.azclierror: Traceback (most recent call last):
File "/opt/homebrew/Cellar/azure-cli/2.61.0/libexec/lib/python3.11/site-packages/knack/cli.py", line 233, in invoke
cmd_result = self.invocation.execute(args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.61.0/libexec/lib/python3.11/site-packages/azure/cli/core/commands/__init__.py", line 664, in execute
raise ex
File "/opt/homebrew/Cellar/azure-cli/2.61.0/libexec/lib/python3.11/site-packages/azure/cli/core/commands/__init__.py", line 731, in _run_jobs_serially
results.append(self._run_job(expanded_arg, cmd_copy))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.61.0/libexec/lib/python3.11/site-packages/azure/cli/core/commands/__init__.py", line 701, in _run_job
result = cmd_copy(params)
^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.61.0/libexec/lib/python3.11/site-packages/azure/cli/core/commands/__init__.py", line 334, in __call__
return self.handler(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.61.0/libexec/lib/python3.11/site-packages/azure/cli/core/commands/command_operation.py", line 121, in handler
return op(**command_args)
^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.61.0/libexec/lib/python3.11/site-packages/azure/cli/command_modules/profile/custom.py", line 175, in login
selected = SubscriptionSelector(subscriptions)()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.61.0/libexec/lib/python3.11/site-packages/azure/cli/command_modules/profile/_subscription_selector.py", line 19, in __init__
self._format_subscription_table()
File "/opt/homebrew/Cellar/azure-cli/2.61.0/libexec/lib/python3.11/site-packages/azure/cli/command_modules/profile/_subscription_selector.py", line 52, in _format_subscription_table
'Tenant': highlight_text(self._get_tenant_string(sub), is_default)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.61.0/libexec/lib/python3.11/site-packages/azure/cli/command_modules/profile/_subscription_selector.py", line 31, in highlight_text
return format_styled_text((Style.HIGHLIGHT, text)) if row_is_default else text
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.61.0/libexec/lib/python3.11/site-packages/azure/cli/core/style.py", line 201, in format_styled_text
formatted_parts.append(escape_seq + raw_text)
~~~~~~~~~~~^~~~~~~~~~
TypeError: can only concatenate str (not "NoneType") to str
from azure-cli.
cli.azure.cli.core.sdk.policies: Request URL: 'https://management.azure.com/subscriptions?api-version=2022-12-01'
...
cli.azure.cli.core.sdk.policies: Response content:
// Not sure if I can post the contents of the array so I deleted it for safety
cli.azure.cli.core.sdk.policies: {"value":[]}
cli.azure.cli.core.azclierror: Traceback (most recent call last):
File "/opt/homebrew/Cellar/azure-cli/2.61.0/libexec/lib/python3.11/site-packages/knack/cli.py", line 233, in invoke
cmd_result = self.invocation.execute(args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.61.0/libexec/lib/python3.11/site-packages/azure/cli/core/commands/__init__.py", line 664, in execute
raise ex
File "/opt/homebrew/Cellar/azure-cli/2.61.0/libexec/lib/python3.11/site-packages/azure/cli/core/commands/__init__.py", line 731, in _run_jobs_serially
results.append(self._run_job(expanded_arg, cmd_copy))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.61.0/libexec/lib/python3.11/site-packages/azure/cli/core/commands/__init__.py", line 701, in _run_job
result = cmd_copy(params)
^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.61.0/libexec/lib/python3.11/site-packages/azure/cli/core/commands/__init__.py", line 334, in __call__
return self.handler(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.61.0/libexec/lib/python3.11/site-packages/azure/cli/core/commands/command_operation.py", line 121, in handler
return op(**command_args)
^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.61.0/libexec/lib/python3.11/site-packages/azure/cli/command_modules/profile/custom.py", line 175, in login
selected = SubscriptionSelector(subscriptions)()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.61.0/libexec/lib/python3.11/site-packages/azure/cli/command_modules/profile/_subscription_selector.py", line 19, in __init__
self._format_subscription_table()
File "/opt/homebrew/Cellar/azure-cli/2.61.0/libexec/lib/python3.11/site-packages/azure/cli/command_modules/profile/_subscription_selector.py", line 52, in _format_subscription_table
'Tenant': highlight_text(self._get_tenant_string(sub), is_default)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.61.0/libexec/lib/python3.11/site-packages/azure/cli/command_modules/profile/_subscription_selector.py", line 31, in highlight_text
return format_styled_text((Style.HIGHLIGHT, text)) if row_is_default else text
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.61.0/libexec/lib/python3.11/site-packages/azure/cli/core/style.py", line 201, in format_styled_text
formatted_parts.append(escape_seq + raw_text)
~~~~~~~~~~~^~~~~~~~~~
TypeError: can only concatenate str (not "NoneType") to str
from azure-cli.
It seems that this error is not blocking me from the login itself like @TheOnlyWei pointed out.
from azure-cli.
Related Issues (20)
- Service Bus purge / batch delete HOT 1
- Loading the mysql command module adding 5+ seconds to almost all commands. HOT 6
- Not able to login using azure-cli HOT 4
- Testing local Azure Function (Python) + VS Code + Azurite error: Token Expired HOT 4
- Azure Database for PostgreSQL Flexible Server failed to deploy HOT 8
- WAM broker failing in latest 2.63 release for at least ROPC flow HOT 16
- Azure CLI "az containerapp logs show" - retruns malformed JSON HOT 3
- Failed to connect to MSI to create service principle HOT 3
- Create OpenAPI v2/v3 and OpenAPI v1 schemas in API Management HOT 1
- Failed to add Load Balancer addresses to backend pools when syncMode of the Backend pool is set to 'Automatic' HOT 2
- Export SQL database to a local file HOT 1
- Microsoft.Network Resource Provider does not Register HOT 4
- Azure Language copy via az cli HOT 3
- Use Location Header instead of Latest to get Flex deployment update HOT 2
- az vmss list command broken HOT 1
- Run kubectl command encountered failed get token issue by Azure CLI HOT 4
- Allow use of the interactive subscription selector for selecting amongst already logged in accounts HOT 1
- az storage account or-policy create --policy with json file exception HOT 2
- Script only works with destination storage account HOT 2
- az functionapp config set --resource-group some-rg --name some-functionapp --vnet-route-all-enabled false HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from azure-cli.