Azure / autorest.az

Azure CLI Code Generator
MIT License
22 stars 20 forks source link

Autorest az 1.8.0 failing with TypeError: extension.updatePythonPath #899

Open jjdharini22 opened 1 year ago

jjdharini22 commented 1 year ago

Hello, I am trying to generate client libraries using the following command autorest --az --version=3.0.6370 --azure-cli-extension='' --sdk-flatten <path-to-readme.md>

This fails with the following error.

AutoRest code generation utility [cli version: 3.6.2; node: v14.17.3]
(C) 2018 Microsoft Corporation.
https://aka.ms/autorest
info    | AutoRest core version selected from configuration: 3.0.6370.
   Loading AutoRest core      'C:\Users\djaiganesh\.autorest\@autorestcore@3.0.6370\nodemodules\@autorest\core\dist' (3.0.6370)
   Loading AutoRest extension '@autorest/az' (1.7.2->1.7.2)
   Loading AutoRest extension '@autorest/python' (5.4.0->5.4.0)
   Loading AutoRest extension '@autorest/clicommon' (0.6.1->0.6.1)
   Loading AutoRest extension '@autorest/modelerfour' (4.15.421->4.15.421)
TypeError: extension.updatePythonPath is not a function
Process() cancelled due to failure

I noticed this fails during the dependency installation of autorest/python 5.4.0. I tried all the workarounds mentioned in some other issues like installing @autorest/python 5.4.0's dependencies in its virtual environment. But none of this seems to fix this issue.

I also tried older versions of az (1.7.0, 1.6.2), none of which worked.

Please let me know if there is some workaround that actually works. Or if there are any patch available?

Thanks

dorothyhu commented 1 year ago

@jjdharini22 Did you solve the issue? I encountered the same problem

ankjayant commented 1 year ago

+1 looking for response

ankjayant commented 1 year ago

@edyoung