Skip to content
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

Name not recognized as cmdlet name #15703

Closed
Alexander-Ageev opened this issue Mar 18, 2021 · 7 comments
Closed

Name not recognized as cmdlet name #15703

Alexander-Ageev opened this issue Mar 18, 2021 · 7 comments
Assignees
Labels
area-editor-* User-facing catch-all bug Issue identified by VS Code Team member as probable bug

Comments

@Alexander-Ageev
Copy link

Issue Type: Bug

При запуске VSCode возникает ошибка & : Имя "C:/Users/лександр/AppData/Local/Programs/Python/Python39/python.exe" не распознано как имя командлета, функции, файла сценария или выполняемой программы.
В фрагменте Users/лександр/ пропущена буква А. При объединении двух путей к папкам /python и /python/script в переменной среды Path из двух строк в обну и обратно и перезагрузке VSCode перестает выдавать ошибку до следующего запуска VSCode

Extension version: 2021.3.658691958
VS Code version: Code 1.54.3 (2b9aebd5354a3629c3aba0a5f5df49f43d6689f8, 2021-03-15T10:55:45.459Z)
OS version: Windows_NT x64 10.0.19042

System Info
Item Value
CPUs Intel(R) Core(TM) i5-4670 CPU @ 3.40GHz (4 x 3392)
GPU Status 2d_canvas: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
oop_rasterization: enabled
opengl: enabled_on
protected_video_decode: unavailable_off
rasterization: enabled
skia_renderer: enabled_on
video_decode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
Load (avg) undefined
Memory (System) 7.89GB (4.37GB free)
Process Argv --crash-reporter-id 646c94cc-05bb-4612-b697-4199a6322056
Screen Reader no
VM 67%
A/B Experiments
vsliv368cf:30146710
vsreu685:30147344
python383:30185418
vspor879:30202332
vspor708:30202333
vspor363:30204092
pythonvsdeb440:30248342
pythonvsded773:30248341
vstes627:30244334
pythonvspyt875:30259475
pythonvsnew554:30277037
pythontb:30265425
vscoresta800cf:30276762
vspre833cf:30267465
vsfjg287:30275553
vshan820cf:30276953

@ghost ghost added the triage-needed Needs assignment to the proper sub-team label Mar 18, 2021
@brettcannon
Copy link
Member

@int19h can you read this?

@karthiknadig karthiknadig added area-editor-* User-facing catch-all triage bug Issue identified by VS Code Team member as probable bug labels Mar 22, 2021
@ghost ghost removed the triage-needed Needs assignment to the proper sub-team label Mar 22, 2021
@karrtikr
Copy link

Thanks for the bug report! We investigate issues in order based on priority and severity, which includes the impact it has on your ability to use the extension to do productive work, and the number of people affected. If other users come forward and leave a comment demonstrating they are seeing/reproducing the problem then we will raise this issue's priority.

If you think your issue is more of a question or configuration problem rather than a bug, please ask on Stack Overflow with the visual-studio-code and python labels for help.

Thanks for your understanding and patience!

@int19h
Copy link

int19h commented Mar 24, 2021

The error message is from PowerShell, saying that it couldn't find path to Python. However, the reason why it couldn't do so appears to be a missing non-Latin letter (Cyrillic "А") in the path, rendering it invalid. It sounds like some Unicode or locale handling issue?

@int19h
Copy link

int19h commented Mar 24, 2021

@Alexander-Ageev

При объединении двух путей к папкам /python и /python/script в переменной среды Path из двух строк в одну

Александр, я не совсем понял, что имеется в виду - глобальный и пользовательский PATH? Или что-то еще? Лучше всего было бы увидеть значение переменной до и после.

@Alexander-Ageev
Copy link
Author

@Alexander-Ageev

При объединении двух путей к папкам /python и /python/script в переменной среды Path из двух строк в одну

Александр, я не совсем понял, что имеется в виду - глобальный и пользовательский PATH? Или что-то еще? Лучше всего было бы увидеть значение переменной до и после.

Речь шла о пользовательском PATH.
В момент возникновения проблемы Path был записан в две строки:
%USERPROFILE%\AppData\Local\Programs\Python\Python39
%USERPROFILE%\AppData\Local\Programs\Python\Python39\Scripts
После этого эти две строки собирались в одну:
%USERPROFILE%\AppData\Local\Programs\Python\Python39;%USERPROFILE%\AppData\Local\Programs\Python\Python39\Scripts
VS Code несколько раз перезапускался и ошибка пропадала.
В итоге проблема решилась установкой power shell 7 (до этого стоял ps 5).

@ghost ghost removed the triage label Mar 24, 2021
@ghost ghost added the triage-needed Needs assignment to the proper sub-team label Mar 24, 2021
@Alexander-Ageev
Copy link
Author

The error message is from PowerShell, saying that it couldn't find path to Python. However, the reason why it couldn't do so appears to be a missing non-Latin letter (Cyrillic "А") in the path, rendering it invalid. It sounds like some Unicode or locale handling issue?
Я обратил внимание на отсутствующую букву, но находил такую же проблему, ч отсутствующей латинской первой буквой. Находил даже информацию, что эту букву съедает power shell при конвертации пути, но как исправить проблему именно на power shell 5 не понял. Мои пляски с изменением Path не более чем шаманство.

@int19h
Copy link

int19h commented Mar 24, 2021

Похоже, это какой-то глюк PowerShell. Если установка 7-го полностью лечит эту проблему, значит, они её уже пофиксили со своей стороны.

@int19h int19h closed this as completed Mar 24, 2021
@ghost ghost removed the triage-needed Needs assignment to the proper sub-team label Mar 24, 2021
@karrtikr karrtikr changed the title Имя не распознано как имя командлета Name not recognized as cmdlet name Mar 24, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 29, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-editor-* User-facing catch-all bug Issue identified by VS Code Team member as probable bug
Projects
None yet
Development

No branches or pull requests

5 participants