Skip to content

Unexpected token 'resolve' in expression or statement. #966

Description

@rzhao271

On Windows 11, when I run the command "Python: Run Python Environment Tool (PET) in Terminal...", select "Resolve Environment", and give it a path, it runs a pwsh terminal and emits the following error:

PS C:\Users\raymondzhao\work\endgame\testworkspace3> "c:\Users\raymondzhao\.vscode-insiders\extensions\ms-python.vscode-python-envs-1.11.13081015-win32-x64\python-env-tools\bin\pet.exe" resolve "C:\Users\raymondzhao\work\endgame\testworkspace3\.venv-1\Scripts"
ParserError: 
Line |
   1 |  … 1.11.13081015-win32-x64\python-env-tools\bin\pet.exe" resolve "C:\Use …
     |                                                          ~~~~~~~
     | Unexpected token 'resolve' in expression or statement.

The same error occurs when I add \python.exe to the end of that absolute path.

Activity

  1. rzhao271 commented on Nov 6, 2025

    @rzhao271
    ContributorAuthor

    I confirmed the command is missing a starting & for pwsh:

    (.venv-1) (base) PS C:\Users\raymondzhao\work\endgame\testworkspace3> "c:\Users\raymondzhao\.vscode-insiders\extensions\ms-python.vscode-python-envs-1.11.13081015-win32-x64\python-env-tools\bin\pet.exe" help
    ParserError: 
    Line |
       1 |  … ython-envs-1.11.13081015-win32-x64\python-env-tools\bin\pet.exe" help
         |                                                                     ~~~~
         | Unexpected token 'help' in expression or statement.
    c:\Users\raymondzhao\.vscode-insiders\extensions\ms-python.vscode-python-envs-1.11.13081015-win32-x64\python-env-tools\bin\pet.exe
    (.venv-1) (base) PS C:\Users\raymondzhao\work\endgame\testworkspace3> & "c:\Users\raymondzhao\.vscode-insiders\extensions\ms-python.vscode-python-envs-1.11.13081015-win32-x64\python-env-tools\bin\pet.exe" help
    Usage: pet.exe [COMMAND]
    
    Commands:
      find     Finds the environments and reports them to the standard output
      resolve  Resolves & reports the details of the the environment to the standard output
      server   Starts the JSON RPC Server
      help     Print this message or the help of the given subcommand(s)
    
    Options:
      -h, --help     Print help
      -V, --version  Print version
    (.venv-1) (base) PS C:\Users\raymondzhao\work\endgame\testworkspace3>
    
  2. locked as resolved and limited conversation to collaborators on Apr 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions