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

Unable to start Python application via powershell #799

Closed
weinand opened this issue Feb 15, 2018 · 1 comment
Closed

Unable to start Python application via powershell #799

weinand opened this issue Feb 15, 2018 · 1 comment
Labels
area-debugging bug Issue identified by VS Code Team member as probable bug

Comments

@weinand
Copy link

weinand commented Feb 15, 2018

From @sveinse on February 15, 2018 22:58

Version 1.20.1
Commit f88bbf9137d24d36d968ea6b2911786bfe103002
Date 2018-02-13T15:34:36.336Z
Shell 1.7.9
Renderer 58.0.3029.110
Node 7.9.0
Architecture x64

On a completely fresh Windows 10 machine, using Python3, with the Py project having its own virtualenv. VSCode is setup to use the virtualenv. I am unable to start the following application because PS fails to parse the "${config.python.pythonPath}" which apparently resolves as "${workspaceFolder}" that PS does not understand.

{
    // Use IntelliSense to learn about possible attributes.
    // Hover to view descriptions of existing attributes.
    // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
    "version": "0.2.0",
    "configurations": [

        {
            "name": "Matrixplay",
            "type": "python",
            "request": "launch",
            "stopOnEntry": true,
            "pythonPath": "${config:python.pythonPath}",
            "program": "${workspaceFolder}/matrixplay/__main__.py",
            "cwd": "${workspaceFolder}",
            "args": [],
            "console": "integratedTerminal",
            "env": {},
            //"envFile": "${workspaceFolder}/.env",
            "debugOptions": [
                "RedirectOutput", 
            ]
        }
    ]
}
PS C:\Svein\Prosjekt\matrixplay> cd 'C:\Svein\Prosjekt\matrixplay'; ${env:PYTHONIOENCODING}='UTF-8';
${env:PYTHONUNBUFFERED}='1'; & '${workspaceFolder}\venv3\Scripts\python.exe'
'C:\Users\svein\.vscode\extensions\ms-python.python-2018.1.0\pythonFiles\PythonTools\visualstudio_py_launcher.py' 
'C:\Svein\Prosjekt\matrixplay' '54097' '34806ad9-833a-4524-8cd6-18ca4aa74f14' 'DUMMYVALUE' 'C:\Svein\Prosjekt\matrixplay/matrixplay/__main__.py'

& : The term '${workspaceFolder}\venv3\Scripts\python.exe' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.

At line:1 char:100
+ ... UFFERED}='1'; & '${workspaceFolder}\venv3\Scripts\python.exe' 'C:\Use ...
+                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (${workspaceFold...ipts\python.exe:Strin
   g) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

Copied from original issue: microsoft/vscode#43788

@DonJayamanne
Copy link

@sveinse

Closing as this is a duplicate of #691
The fix will be in the next release (end of this month).

Until then please use the Insiders build of this extension as it contains the fix (Note: I'm not referring to VS Code Insiders).

The instructions to download and install this insiders build of the extension can be found here, under Insiders Buid

@DonJayamanne DonJayamanne added bug Issue identified by VS Code Team member as probable bug closed-duplicate area-debugging labels Feb 15, 2018
@lock lock bot locked as resolved and limited conversation to collaborators Jul 12, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-debugging bug Issue identified by VS Code Team member as probable bug
Projects
None yet
Development

No branches or pull requests

3 participants