"az interactive" command does not work in Microsoft Learn sandbox

Akhilesh Pai 36 Reputation points
2022-10-27T08:58:41.333+00:00

Hi,

I recently started working on the AZ-900 course and I have started using the Microsoft Learn sandbox.

I am currently on the "Azure Fundamentals: Describe Azure architecture and services" learning path doing the "Describe the core architectural components of Azure" module. The lesson I am on is "Explore the Learn sandbox" and I successfully went through the first 3 tasks fine, but when it came to using "az interactive", I keep getting the following error.

PS /home/akpai22> az interactive  
This command is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus  
Installing the Interactive extension...  
The installed extension 'interactive' is in preview.  
The command failed with an unexpected error. Here is the traceback:  
No module named 'prompt_toolkit.interface'  
Traceback (most recent call last):  
  File "/usr/lib64/az/lib/python3.9/site-packages/knack/cli.py", line 233, in invoke  
    cmd_result = self.invocation.execute(args)  
  File "/usr/lib64/az/lib/python3.9/site-packages/azure/cli/core/commands/__init__.py", line 663, in execute  
    raise ex  
  File "/usr/lib64/az/lib/python3.9/site-packages/azure/cli/core/commands/__init__.py", line 726, in _run_jobs_serially  
    results.append(self._run_job(expanded_arg, cmd_copy))  
  File "/usr/lib64/az/lib/python3.9/site-packages/azure/cli/core/commands/__init__.py", line 697, in _run_job  
    result = cmd_copy(params)  
  File "/usr/lib64/az/lib/python3.9/site-packages/azure/cli/core/commands/__init__.py", line 333, in __call__  
    return self.handler(*args, **kwargs)  
  File "/usr/lib64/az/lib/python3.9/site-packages/azure/cli/core/commands/command_operation.py", line 121, in handler  
    return op(**command_args)  
  File "/usr/lib64/az/lib/python3.9/site-packages/azure/cli/command_modules/interactive/custom.py", line 41, in start_shell  
    azext_interactive.start_shell(cmd, style=style)  
  File "/home/akpai22/.azure/cliextensions/interactive/azext_interactive/__init__.py", line 10, in start_shell  
    from .azclishell.app import AzInteractiveShell  
  File "/home/akpai22/.azure/cliextensions/interactive/azext_interactive/azclishell/app.py", line 33, in <module>  
    from prompt_toolkit.interface import Application, CommandLineInterface  
ModuleNotFoundError: No module named 'prompt_toolkit.interface'  

I looked at this GitHub post: https://github.com/Azure/azure-cli/issues/24213
This suggests using the command "sudo rm -rf /usr/lib64/az/lib/python3.9/site-packages/prompt_toolkit"

However, when I use that command, I am prompted to enter a password, but I have never set a password as it was a Learn sandbox, so none of the passwords I tried worked.

Can anyone help me solve this issue?

Azure Training
Azure Training
Azure: A cloud computing platform and infrastructure for building, deploying and managing applications and services through a worldwide network of Microsoft-managed datacenters.Training: Instruction to develop new skills.
1,225 questions
0 comments No comments
{count} votes

Accepted answer
  1. QuantumCache 20,186 Reputation points
    2022-10-27T14:42:13.073+00:00

    Hello @Akhilesh Pai , Thanks for reporting this issue on this forum.

    Why isn't the command az interactive working in my sandbox?
    This is an issue we are working to resolve and it should be fixed by the service connector team with a roll out on 11.01.2022.

    • What is affected? The impact of this issue is limited to task 3 (Use Azure CLI interactive mode) in module 4 (Exercise - Explore the Learn sandbox) of the Describe the core architectural components of Azure learning path. All other portions of the learning path are unaffected.
    • What should I do? Skip task 3 for now and continue the learning path as normal. Revisit task 3 once there is a fix on 11.01.2022.
    • When will this be resolved? There is a planned fix that will be released on 11.01.2022

    For more details, you can follow the issue on GitHub:
    {Service Connector} Fix #24213: az spring connection create mysql-flexible: Resolve dependency conflict with interactive extension #24268

    254799-image.png

    Related Github issues: az interactive fails to start: ModuleNotFoundError: No module named 'prompt_toolkit.interface'

    Screenshot of the issue:

    254825-image.png


0 additional answers

Sort by: Most helpful