Skip to content

Error when user folder name contains '&' #18722

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
tccrabyoguy opened this issue Mar 21, 2022 · 6 comments · Fixed by #18855 or #18870
Closed

Error when user folder name contains '&' #18722

tccrabyoguy opened this issue Mar 21, 2022 · 6 comments · Fixed by #18855 or #18870
Assignees
Labels
area-terminal bug Issue identified by VS Code Team member as probable bug verified Verification succeeded
Milestone

Comments

@tccrabyoguy
Copy link

tccrabyoguy commented Mar 21, 2022

Issue Type: Bug

Behaviour

Expected vs. Actual

[ERROR 2022-2-21 10:25:37.522]: Error: Command failed: "C:\Program Files\Python39\python.exe" c:\Users\A.B.CCC&DD~YYY\.vscode\extensions\ms-python.python-2022.2.1924087327\pythonFiles\get_output_via_markers.py c:\Users\A.B.CCC&DD~YYY\.vscode\extensions\ms-python.python-2022.2.1924087327\pythonFiles\interpreterInfo.py
C:\Program Files\Python39\python.exe: can't open file 'c:\Users\A.B.CCC': [Errno 2] No such file or directory
ϵͳ�Ҳ���ָ����·����
ϵͳ�Ҳ���ָ����·����

Steps to reproduce:

Diagnostic data

  • Python version (& distribution if applicable, e.g. Anaconda): 3.9.0, 3.10.0
  • Type of virtual environment used (e.g. conda, venv, virtualenv, etc.): None
  • Value of the python.languageServer setting: Default
User Settings


defaultLS: {"defaultLSType":"Pylance"}

downloadLanguageServer: true

envFile: "<placeholder>"

venvPath: "<placeholder>"

venvFolders: "<placeholder>"

condaPath: "<placeholder>"

pipenvPath: "<placeholder>"

poetryPath: "<placeholder>"

languageServer: "Pylance"

linting
• enabled: true
• cwd: "<placeholder>"
• Flake8Args: "<placeholder>"
• flake8Enabled: false
• flake8Path: "<placeholder>"
• lintOnSave: true
• banditArgs: "<placeholder>"
• banditEnabled: false
• banditPath: "<placeholder>"
• mypyArgs: "<placeholder>"
• mypyEnabled: false
• mypyPath: "<placeholder>"
• pycodestyleArgs: "<placeholder>"
• pycodestyleEnabled: false
• pycodestylePath: "<placeholder>"
• prospectorArgs: "<placeholder>"
• prospectorEnabled: false
• prospectorPath: "<placeholder>"
• pydocstyleArgs: "<placeholder>"
• pydocstyleEnabled: false
• pydocstylePath: "<placeholder>"
• pylamaArgs: "<placeholder>"
• pylamaEnabled: false
• pylamaPath: "<placeholder>"
• pylintArgs: "<placeholder>"
• pylintPath: "<placeholder>"

sortImports
• args: "<placeholder>"
• path: "<placeholder>"

formatting
• autopep8Args: "<placeholder>"
• autopep8Path: "<placeholder>"
• provider: "autopep8"
• blackArgs: "<placeholder>"
• blackPath: "<placeholder>"
• yapfArgs: "<placeholder>"
• yapfPath: "<placeholder>"

testing
• cwd: "<placeholder>"
• debugPort: 3000
• nosetestArgs: "<placeholder>"
• nosetestsEnabled: undefined
• nosetestPath: "<placeholder>"
• promptToConfigure: true
• pytestArgs: "<placeholder>"
• pytestEnabled: false
• pytestPath: "<placeholder>"
• unittestArgs: "<placeholder>"
• unittestEnabled: false
• autoTestDiscoverOnSaveEnabled: true

terminal
• activateEnvironment: true
• executeInFileDir: "<placeholder>"
• launchArgs: "<placeholder>"

experiments
• enabled: true
• optInto: []
• optOutFrom: []

insidersChannel: "off"

tensorBoard
• logDirectory: "<placeholder>"

Extension version: 2022.2.1924087327
VS Code version: Code 1.65.2 (c722ca6c7eed3d7987c0d5c3df5c45f6b15e77d1, 2022-03-10T14:33:55.248Z)
OS version: Windows_NT x64 10.0.19044
Restricted Mode: No

@github-actions github-actions bot added the triage-needed Needs assignment to the proper sub-team label Mar 21, 2022
@karthiknadig karthiknadig added bug Issue identified by VS Code Team member as probable bug triage area-terminal and removed triage-needed Needs assignment to the proper sub-team labels Mar 21, 2022
@karrtikr karrtikr added investigating We are looking into the cause of the issue and removed triage labels Mar 21, 2022
@karrtikr karrtikr added needs PR and removed investigating We are looking into the cause of the issue labels Apr 4, 2022
@karrtikr karrtikr added this to the April 2022 milestone Apr 4, 2022
@karrtikr karrtikr added the verification-needed Verification of issue is requested label Apr 4, 2022
@karrtikr
Copy link

karrtikr commented Apr 4, 2022

@tccrabyoguy Try using the pre-release version of the extension which has the fix:

image

@tccrabyoguy
Copy link
Author

Hi, @karrtikr

Thanks for your working!

I had tried the pre-release version of the extension.
But it still not working properly.

Please check the log below.

BTW I found another problem.
As you can see, the log date is incorrect.
The date is one month ago, and the time is correct.

用户属于 'pythonaa' 实验组
用户属于 'pythonTensorboardExperiment' 实验组
用户属于 'PythonPyTorchProfiler' 实验组
用户属于 'pythonDeprecatePythonPath' 实验组
用户属于 'pythonInterpreterInfoUnpinned' 实验组
> conda info --json
> ~\AppData\Local\Programs\Python\Python310\python.exe ~\.vscode\extensions\ms-python.python-2022.5.10911002\pythonFiles\get_output_via_markers.py ~\.vscode\extensions\ms-python.python-2022.5.10911002\pythonFiles\interpreterInfo.py
[ERROR 2022-3-6 8:37:30.782]: Error: Command failed: C:\Users\T.C.crab&Yo~GuY\AppData\Local\Programs\Python\Python310\python.exe c:\Users\T.C.crab&Yo~GuY\.vscode\extensions\ms-python.python-2022.5.10911002\pythonFiles\get_output_via_markers.py c:\Users\T.C.crab&Yo~GuY\.vscode\extensions\ms-python.python-2022.5.10911002\pythonFiles\interpreterInfo.py
'C:\Users\T.C.crab' �����ڲ����ⲿ���Ҳ���ǿ����еij���
�����������
ϵͳ�Ҳ���ָ����·����
ϵͳ�Ҳ���ָ����·����
ϵͳ�Ҳ���ָ����·����

    at ChildProcess.exithandler (node:child_process:406:12)
    at ChildProcess.emit (node:events:390:28)
    at maybeClose (node:internal/child_process:1064:16)
    at Socket.<anonymous> (node:internal/child_process:450:11)
    at Socket.emit (node:events:390:28)
    at Pipe.<anonymous> (node:net:687:12) {
  killed: false,
  code: 1,
  signal: null,
  cmd: 'C:\\Users\\T.C.crab&Yo~GuY\\AppData\\Local\\Programs\\Python\\Python310\\python.exe c:\\Users\\T.C.crab&Yo~GuY\\.vscode\\extensions\\ms-python.python-2022.5.10911002\\pythonFiles\\get_output_via_markers.py c:\\Users\\T.C.crab&Yo~GuY\\.vscode\\extensions\\ms-python.python-2022.5.10911002\\pythonFiles\\interpreterInfo.py'
}
[ERROR 2022-3-6 8:37:31.379]: No python is installed or a refresh has not already been triggered
正在启动 Pylance 语言服务器。
[ERROR 2022-3-6 8:37:31.817]: No python is installed or a refresh has not already been triggered
Diagnostic Code: NoPythonInterpretersDiagnostic, Message: Python is not installed. Please download and install Python before using the extension.

@karrtikr
Copy link

karrtikr commented Apr 6, 2022

Sorry Pre-release version with the fix hasn't been released yet. Can you please try to install https://github.com/microsoft/vscode-python/suites/5947251954/artifacts/203903588. You can use Extension: Install from VSIX command to install it. Feel free to give it a try and let me know if it's still a issue.

@tccrabyoguy
Copy link
Author

Hi, @karrtikr

I installed the extension from vsix and tried again. But still not working.
Please check the log, thank you very much!

用户属于 'pythonaa' 实验组
用户属于 'pythonTensorboardExperiment' 实验组
用户属于 'PythonPyTorchProfiler' 实验组
用户属于 'pythonDeprecatePythonPath' 实验组
用户属于 'pythonInterpreterInfoUnpinned' 实验组
> conda info --json
> ~\AppData\Local\Programs\Python\Python310\python.exe ~\.vscode\extensions\ms-python.python-2022.5.2099471260-dev\pythonFiles\get_output_via_markers.py ~\.vscode\extensions\ms-python.python-2022.5.2099471260-dev\pythonFiles\interpreterInfo.py
[ERROR 2022-3-6 11:0:59.809]: Error: Command failed: C:\Users\T.C.crab&Yo~GuY\AppData\Local\Programs\Python\Python310\python.exe c:\Users\T.C.crab&Yo~GuY\.vscode\extensions\ms-python.python-2022.5.2099471260-dev\pythonFiles\get_output_via_markers.py c:\Users\T.C.crab&Yo~GuY\.vscode\extensions\ms-python.python-2022.5.2099471260-dev\pythonFiles\interpreterInfo.py
'C:\Users\T.C.crab' �����ڲ����ⲿ���Ҳ���ǿ����еij���
�����������
ϵͳ�Ҳ���ָ����·����
ϵͳ�Ҳ���ָ����·����
ϵͳ�Ҳ���ָ����·����

    at ChildProcess.exithandler (node:child_process:406:12)
    at ChildProcess.emit (node:events:390:28)
    at maybeClose (node:internal/child_process:1064:16)
    at Socket.<anonymous> (node:internal/child_process:450:11)
    at Socket.emit (node:events:390:28)
    at Pipe.<anonymous> (node:net:687:12) {
  killed: false,
  code: 1,
  signal: null,
  cmd: 'C:\\Users\\T.C.crab&Yo~GuY\\AppData\\Local\\Programs\\Python\\Python310\\python.exe c:\\Users\\T.C.crab&Yo~GuY\\.vscode\\extensions\\ms-python.python-2022.5.2099471260-dev\\pythonFiles\\get_output_via_markers.py c:\\Users\\T.C.crab&Yo~GuY\\.vscode\\extensions\\ms-python.python-2022.5.2099471260-dev\\pythonFiles\\interpreterInfo.py'
}
[ERROR 2022-3-6 11:1:0.124]: No python is installed or a refresh has not already been triggered
正在启动 Pylance 语言服务器。
[ERROR 2022-3-6 11:1:0.481]: No python is installed or a refresh has not already been triggered
Diagnostic Code: NoPythonInterpretersDiagnostic, Message: Python is not installed. Please download and install Python before using the extension.

@karrtikr karrtikr reopened this Apr 6, 2022
@karrtikr karrtikr added verification-found Issue verification failed and removed verification-needed Verification of issue is requested labels Apr 6, 2022
@karrtikr
Copy link

karrtikr commented Apr 6, 2022

Thanks for letting us know! Can you please try to install https://github.com/microsoft/vscode-python/suites/5958529344/artifacts/204630783 and see if it helps?

@karrtikr karrtikr added verification-needed Verification of issue is requested and removed verification-found Issue verification failed labels Apr 6, 2022
@tccrabyoguy
Copy link
Author

Hi, @karrtikr

I can run the python, thanks for your help, have a nice day!

image

@karrtikr karrtikr added verified Verification succeeded and removed verification-needed Verification of issue is requested labels Apr 7, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 8, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-terminal bug Issue identified by VS Code Team member as probable bug verified Verification succeeded
Projects
None yet
3 participants