Open rich17lucas opened 4 years ago
Which version of the Azure CLI are you running?
Hi Christof, I installed version 0.5.0.
@rich17lucas That must be the extension's version. What does az --version
tell you?
@chrmarti Apologies. The output is:
az --version
azure-cli 2.1.0
command-modules-nspkg 2.0.3
core 2.1.0
nspkg 3.0.4
telemetry 1.0.4
Python location 'C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\python.exe'
Extensions directory 'C:\Users\rnslucas\.azure\cliextensions'
Python (Windows) 3.6.6 (v3.6.6:4cf1f54eb7, Jun 27 2018, 02:47:15) [MSC v.1900 32 bit (Intel)]
The Python location is interesting as the error message in the VSCode console refers to the Anaconda installation on the E:
What do you get for the following in PowerShell:
& 'C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\python.exe' -c "import sys; print('\n'.join(sys.path))"
Please upgrade to the Azure CLI 2.2.0 to make sure you are not missing any bugfixes.
Hi The PowerShell output is here:
PS C:\Users\rnslucas> & 'C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\python.exe' -c "import sys; print('\n'.join(sys.path))"
Failed to import the site module
Traceback (most recent call last):
File "E:\Anaconda3\lib\site.py", line 579, in <module>
main()
File "E:\Anaconda3\lib\site.py", line 566, in main
known_paths = addsitepackages(known_paths)
File "E:\Anaconda3\lib\site.py", line 349, in addsitepackages
addsitedir(sitedir, known_paths)
File "E:\Anaconda3\lib\site.py", line 207, in addsitedir
addpackage(sitedir, name, known_paths)
File "E:\Anaconda3\lib\site.py", line 159, in addpackage
f = open(fullname, "r")
File "E:\Anaconda3\lib\_bootlocale.py", line 12, in getpreferredencoding
if sys.flags.utf8_mode:
AttributeError: 'sys.flags' object has no attribute 'utf8_mode'
PS C:\Users\rnslucas>
This is the system path:
$env:path -split ";"
C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\wbin
.
C:\Program Files (x86)\AMD APP\bin\x86_64
C:\Program Files (x86)\AMD APP\bin\x86
C:\WINDOWS\system32
C:\WINDOWS
C:\WINDOWS\System32\Wbem
C:\WINDOWS\System32\WindowsPowerShell\v1.0\
C:\ProgramData\Oracle\Java\javapath
C:\Program Files\Common Files\Microsoft Shared\Windows Live
C:\Program Files (x86)\Common Files\Microsoft Shared\Windows Live
C:\Program Files (x86)\VisualSVN Server\bin
c:\cygwin64\
c:\cygwin64\bin
C:\Program Files (x86)\ATI Technologies\ATI.ACE\Core-Static
C:\Program Files (x86)\CheckPoint\fde
C:\Program Files (x86)\ZipGenius 6\
e:\Groovy\Groovy-2.4.10\bin
e:\java\current\bin
e:\grails\grails-2.4.2\bin
C:\Program Files (x86)\Windows Live\Shared
e:\Git\cmd
E:\Pololu\Maestro\bin
C:\Program Files (x86)\Plantronics\Spokes3G\
C:\WINDOWS\System32\OpenSSH\
C:\Program Files\NVIDIA Corporation\NVIDIA NGX
C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common
C:\Program Files\NVIDIA Corporation\NVIDIA NvDLISR
C:\WINDOWS\system32
C:\WINDOWS
C:\WINDOWS\System32\Wbem
C:\WINDOWS\System32\WindowsPowerShell\v1.0\
C:\WINDOWS\System32\OpenSSH\
C:\Program Files\Docker\Docker\resources\bin
C:\ProgramData\DockerDesktop\version-bin
C:\Users\rnslucas\AppData\Local\Microsoft\WindowsApps
C:\Users\rnslucas\AppData\Local\Programs\Microsoft VS Code\bin
C:\Program Files (x86)\Nmap
C:\Users\rnslucas\AppData\Local\Microsoft\WindowsApps
And if I just run python
from a prompt the system opens the Windows AppStore and displays Python 3.8.
Could you change %USERPROFILE%\.vscode\extensions\ms-vscode.azurecli-0.5.0\service\az-service.bat
by adding -IB
to line 4 to:
@echo off
setlocal
%1 -IB %~dp0start.py %*
endlocal
and let me know if that helps?
Hi Christof,
You are a 'steely-eyed missile man'. The -IB
fixed the problem. What does it do?
It runs Python in isolated mode. (Reopening for tracking.)
The AZ Cli plugin is not giving any Intellisense suggestions.
In the Developer Tools console I see these errors appear as I type
az
.If I create a Python file in VSCode, the Python Extension works perfectly, so this seems to be AZCLI extension specific.
Envrionment Setup Windows 10, version 10.0.18362 Build 18362 Python: Anaconda 3.7.4 (default, Aug 9 2019, 18:34:13) [MSC v.1915 64 bit (AMD64)]
Windows details VSCode version 1.43.0 (user setup) Version: 1.43.0 (user setup) Commit: 78a4c91400152c0f27ba4d363eb56d2835f9903a Date: 2020-03-09T19:47:57.235Z Electron: 7.1.11 Chrome: 78.0.3904.130 Node.js: 12.8.1 V8: 7.8.279.23-electron.0 OS: Windows_NT x64 10.0.18362