profile
viewpoint

Ask questionsPylance not enabling when using Remote Development

<!-- Read the guidelines for filing an issue first.

https://github.com/microsoft/pylance-release/blob/master/TROUBLESHOOTING.md#filing-an-issue -->

Environment data

<!-- To find your version:

Select "View: Toggle Output" from the command palette (Ctrl+Shift+P on Windows/Linux, Command+Shift+P on macOS), then select "Python Language Server" in the dropdown on the right. Look for the line Pylance Language Server version X in the console. -->

  • Language Server version: v2020.6.1
  • OS and version: Version: 1.47.0-insider (user setup) Commit: b16b467d3e03e1a1ae05b5836e4e5a5af504e86d Date: 2020-07-01T05:32:07.483Z Electron: 7.3.2 Chrome: 78.0.3904.130 Node.js: 12.8.1 V8: 7.8.279.23-electron.0 OS: Windows_NT x64 10.0.19041
  • Python version (& distribution if applicable, e.g. Anaconda): Python 3.6.9 64, on virtualenv

Running through Remote Development via SSH

Expected behaviour

  • Install extension
  • Activate extension
  • Happy days

Actual behaviour

  • After installing extension and reloading the session, the dialog box to make Pylance the default language server is shown
  • When clicking "Yes, and reload" , after reloading the same dialog is shown. This is repeated despite clicking Yes and reloading many times

image

Logs

<!-- Enable trace logging by adding "python.analysis.logLevel": "Trace" to your settings.json configuration file.

Adding this will cause a large amount of info to be printed to the Python output panel. This should not be left long term, as the performance impact of the logging is significant. -->

User belongs to experiment group 'ShowPlayIcon - start'
User belongs to experiment group 'ShowExtensionSurveyPrompt - control'
User belongs to experiment group 'DebugAdapterFactory - experiment'
User belongs to experiment group 'PtvsdWheels37 - experiment'
User belongs to experiment group 'UseTerminalToGetActivatedEnvVars - control'
User belongs to experiment group 'AA_testing - experiment'
User belongs to experiment group 'LocalZMQKernel - control'
User belongs to experiment group 'CollectLSRequestTiming - control'
User belongs to experiment group 'CollectNodeLSRequestTiming - experiment'
User belongs to experiment group 'EnableIPyWidgets - experiment'
User belongs to experiment group 'DeprecatePythonPath - control'
User belongs to experiment group 'RunByLine - control'
User belongs to experiment group 'CustomEditorSupport - control'
> conda --version
> conda info --json
> pyenv root
> python3.7 ~/.vscode-server-insiders/extensions/ms-python.python-2020.7.91574-dev/pythonFiles/pyvsc-run-isolated.py -c "import sys;print(sys.executable)"
> python3.6 ~/.vscode-server-insiders/extensions/ms-python.python-2020.7.91574-dev/pythonFiles/pyvsc-run-isolated.py -c "import sys;print(sys.executable)"
> python3 ~/.vscode-server-insiders/extensions/ms-python.python-2020.7.91574-dev/pythonFiles/pyvsc-run-isolated.py -c "import sys;print(sys.executable)"
> python2 ~/.vscode-server-insiders/extensions/ms-python.python-2020.7.91574-dev/pythonFiles/pyvsc-run-isolated.py -c "import sys;print(sys.executable)"
> python ~/.vscode-server-insiders/extensions/ms-python.python-2020.7.91574-dev/pythonFiles/pyvsc-run-isolated.py -c "import sys;print(sys.executable)"
> ~/.virtualenvs/affinda/bin/python ~/.vscode-server-insiders/extensions/ms-python.python-2020.7.91574-dev/pythonFiles/pyvsc-run-isolated.py -c "import sys;print(sys.executable)"
Starting Microsoft Python language server.
Python interpreter path: ~/.virtualenvs/affinda/bin/python
> ~/.virtualenvs/affinda/bin/python ~/.vscode-server-insiders/extensions/ms-python.python-2020.7.91574-dev/pythonFiles/pyvsc-run-isolated.py -c "import notebook"
> ~/.virtualenvs/affinda/bin/python ~/.vscode-server-insiders/extensions/ms-python.python-2020.7.91574-dev/pythonFiles/pyvsc-run-isolated.py -c "import jupyter"
> ~/.virtualenvs/affinda/bin/python ~/.vscode-server-insiders/extensions/ms-python.python-2020.7.91574-dev/pythonFiles/pyvsc-run-isolated.py jupyter kernelspec --version
> ~/.virtualenvs/affinda/bin/python ~/.vscode-server-insiders/extensions/ms-python.python-2020.7.91574-dev/pythonFiles/pyvsc-run-isolated.py -c "import ipykernel"
> ~/.virtualenvs/affinda/bin/python ~/.vscode-server-insiders/extensions/ms-python.python-2020.7.91574-dev/pythonFiles/pyvsc-run-isolated.py vscode_datascience_helpers.daemon --daemon-module=vscode_datascience_helpers.kernel_launcher_daemon -v
> ~/.virtualenvs/affinda/bin/python ~/.vscode-server-insiders/extensions/ms-python.python-2020.7.91574-dev/pythonFiles/pyvsc-run-isolated.py pylint --msg-template='{line},{column},{category},{symbol}:{msg}' --reports=n --output-format=text /mnt/affinda/PROJECT_NAME/document.py
cwd: /mnt/affinda/PROJECT_NAME/django
> ~/.virtualenvs/affinda/bin/python ~/.vscode-server-insiders/extensions/ms-python.python-2020.7.91574-dev/pythonFiles/pyvsc-run-isolated.py pylint --msg-template='{line},{column},{category},{symbol}:{msg}' --reports=n --output-format=text /mnt/affinda/PROJECT_NAME/document.py
cwd: /mnt/affinda/PROJECT_NAME/django
> conda --version
##########Linting Output - pylint##########

... linting results

------------------------------------------------------------------
Your code has been rated at 7.58/10 (previous run: 7.58/10, +0.00)


Code Snippet / Additional information

<!-- Note: If you think a GIF of what is happening would be helpful, consider tools like https://www.cockos.com/licecap/, https://github.com/phw/peek or https://www.screentogif.com/ . -->

  • Note that Pylance works fine on a local workspace on the same install.
microsoft/pylance-release

Answer questions erinxocon

@erinxocon I am using an insiders build. Setting Pylance manually makes the prompt go away and it does initialize in wsl and dev environments alike. Also probably related to #16, I'm not getting autocomplete for the pylance config options.

I see that Pylance uses most of the python config options already available! Grand!

useful!

Related questions

No questions were found.
Github User Rank List