Repository: Azure/azure-cli-extensions

Issue:
az interactive` fails with CLI 2.0.64
I am running into an issue with this interactive shell. I successfully updated it before running it and installed the most recent azure-cli version 2.0.64.

azure-cli 2.0.64
Extensions:
interactive 0.4.2

When I ran the az interactive command, the interactive shell shows briefly then it closes.

az>>
Event: CommandInvoker.OnTransformResult [<function _resource_group_transform at 0x041AF738>, <function _x509_from_base64_to_hex_transform at 0x041AF780>]
Event: CommandInvoker.OnFilterResult []
Event: Cli.PostExecute []
az_command_data_logger : exit code: 0


Discussion:
can you try the workaround mentioned in in https://github.com/Azure/azure-cli/issues/9260  and see whether or it resolves your issue?
Hello Yugangw-msft,

Yes, I tried to do exactly what #9260 thread states, but not having success. I am experiencing the same issue described by ilaplace in Linux.
I have repro'd this and it is indeed a bug. `--debug` does not provide much useful additional information.
Downgrading to knack 0.5.4 fixes the issue for me (`pip install knack==0.5.4`). @limingu please update the extension to work with the latest version of knack.
@limingu, please adjust [code](https://github.com/Azure/azure-cli-extensions/blob/master/src/interactive/azext_interactive/azclishell/configuration.py#L65-L70) to work with new knack and  release a new version
@tjprescott  what is the workaround for Windows, I am having the same issue.
If you installed using a packaged installer, I don't believe there is a workaround (@marstr correct me if I'm wrong). @limingu is working on a fix which will be released ASAP.
@bonillajose, @tjprescott

It's a bit of a hack, but you could run the following from a PowerShell opened "As Administrator":

``` PowerShell
& 'C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\python.exe' -m pip install --force-reinstall knack==0.5.4
```

edit: Fixing PowerShell syntax.

Resolving patch:
diff --git a/src/interactive/azext_interactive/azclishell/__init__.py b/src/interactive/azext_interactive/azclishell/__init__.py
--- a/src/interactive/azext_interactive/azclishell/__init__.py
+++ b/src/interactive/azext_interactive/azclishell/__init__.py
@@ -3,4 +3,4 @@
 # Licensed under the MIT License. See License.txt in the project root for license information.
 # --------------------------------------------------------------------------------------------
 
-VERSION = '0.4.2'
+VERSION = '0.4.3'
diff --git a/src/interactive/azext_interactive/azclishell/app.py b/src/interactive/azext_interactive/azclishell/app.py
--- a/src/interactive/azext_interactive/azclishell/app.py
+++ b/src/interactive/azext_interactive/azclishell/app.py
@@ -324,8 +324,13 @@ def generate_help_text(self):
     def _update_default_info(self):
         try:
             defaults_section = self.cli_ctx.config.defaults_section_name
-            options = self.cli_ctx.config.config_parser.options(defaults_section)
             self.config_default = ""
+            if hasattr(self.cli_ctx.config, 'config_parser'):
+                options = self.cli_ctx.config.config_parser.options(defaults_section)
+            elif hasattr(self.cli_ctx.config, 'options'):
+                options = self.cli_ctx.config.options(defaults_section)
+            else:
+                return
             for opt in options:
                 self.config_default += opt + ": " + self.cli_ctx.config.get(defaults_section, opt) + "  "
         except configparser.NoSectionError:


Test patch: