Open dbradish-microsoft opened 8 months ago
Hi @dbradish-microsoft,
2.56.0 is not the latest Azure CLI(2.58.0).
If you haven't already attempted to do so, please upgrade to the latest Azure CLI version by following https://learn.microsoft.com/en-us/cli/azure/update-azure-cli.
Hi @dbradish-microsoft Find similar issue https://github.com/Azure/azure-cli/issues/24453. | ||
---|---|---|
Issue title | The command failed with an unexpected error. Here is the traceback: No module named 'azure.communication' | |
Create time | 2022-10-27 | |
Comment number | 4 |
Please confirm if this resolves your issue.
Thank you for opening this issue, we will look into it.
Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @acsdevx-msft.
Do we have any update here, please? It's been a while!
What worked for me was adding azure-communication-identity
and version to the requirements.txt file. I had tried pip install azure-communication-identity
multiple times, but the error still persisted until I updated the requirements file.
Describe the bug
This bug report is being moved from MicrosoftDocs/azure-docs issue #119472. This issue seems to be related to unresolved issue #24453.
REQUEST: Please route this issue to the Azure service team and have them respond to @juliays in this new GitHub issue. The customer reports as follows:
From @juliays on Feb 2, 2024: " trying this command to get acs communication token.
az communication identity token issue --scope voip --connection-string ""
az version 2.56.0 and up to date.
Got this error below -
Command group 'az communication identity' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus The command failed with an unexpected error. Here is the traceback: No module named 'azure.communication' Traceback (most recent call last): File "/opt/homebrew/Cellar/azure-cli/2.56.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.56.0/libexec/lib/python3.11/site-packages/azure/cli/core/commands/init.py", line 663, in execute raise ex File "/opt/homebrew/Cellar/azure-cli/2.56.0/libexec/lib/python3.11/site-packages/azure/cli/core/commands/init.py", line 726, in _run_jobs_serially results.append(self._run_job(expanded_arg, cmd_copy)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/homebrew/Cellar/azure-cli/2.56.0/libexec/lib/python3.11/site-packages/azure/cli/core/commands/init.py", line 697, in _run_job result = cmd_copy(params) ^^^^^^^^^^^^^^^^ File "/opt/homebrew/Cellar/azure-cli/2.56.0/libexec/lib/python3.11/site-packages/azure/cli/core/commands/init.py", line 333, in call return self.handler(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/homebrew/Cellar/azure-cli/2.56.0/libexec/lib/python3.11/site-packages/azure/cli/core/commands/command_operation.py", line 112, in handler client = self.client_factory(self.cli_ctx, command_args) if self.client_factory else None ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/yangsong/.azure/cliextensions/communication/azext_communication/manual/_client_factory.py", line 13, in cf_communication_identity from azure.communication.identity import CommunicationIdentityClient ModuleNotFoundError: No module named 'azure.communication' "
From @dbradish-microsoft on Feb 7, 2024: " @juliays, How did you install the extension? Try using az extension add --name communication. Your error "No module named 'azure.communication'" makes me wonder if the extension is installed. "
From @juliays on Feb 7, 2024 " I ran the command below and here are the output. I have a macbook. One suggestion is that you also list the option to generate token via portal and cloudshell so ppl have a workaround when it doesn't work. Thanks!
az extension add --name communication --allow-preview true Extension 'communication' 1.8.0b1 is already installed. ➜ main git:(main) az communication identity token issue --scope voip --connection-string "connectionString" This command is implicitly deprecated because command group 'communication identity token' is deprecated and will be removed in a future release. Use 'communication user-identity token' instead. Command group 'az communication identity' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus The command failed with an unexpected error. Here is the traceback: No module named 'azure.communication' Traceback (most recent call last): File "/opt/homebrew/Cellar/azure-cli/2.56.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.56.0/libexec/lib/python3.11/site-packages/azure/cli/core/commands/init.py", line 663, in execute raise ex File "/opt/homebrew/Cellar/azure-cli/2.56.0/libexec/lib/python3.11/site-packages/azure/cli/core/commands/init.py", line 726, in _run_jobs_serially results.append(self._run_job(expanded_arg, cmd_copy)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/homebrew/Cellar/azure-cli/2.56.0/libexec/lib/python3.11/site-packages/azure/cli/core/commands/init.py", line 697, in _run_job result = cmd_copy(params) ^^^^^^^^^^^^^^^^ File "/opt/homebrew/Cellar/azure-cli/2.56.0/libexec/lib/python3.11/site-packages/azure/cli/core/commands/init.py", line 333, in call return self.handler(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/homebrew/Cellar/azure-cli/2.56.0/libexec/lib/python3.11/site-packages/azure/cli/core/commands/command_operation.py", line 112, in handler client = self.client_factory(self.cli_ctx, command_args) if self.client_factory else None ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/yangsong/.azure/cliextensions/communication/azext_communication/manual/_client_factory.py", line 13, in cf_communication_identity from azure.communication.identity import CommunicationIdentityClient ModuleNotFoundError: No module named 'azure.communication' "
Related command
az communication
Errors
The command failed with an unexpected error. Here is the traceback: No module named 'azure.communication'
Issue script & Debug output
Please see above
Expected behavior
The
az communication
module installs without errorEnvironment Summary
azure-cli/2.56.0/libexec/lib/python3.11
Additional context
No response