question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

pyvsc-run-isolated slashes not escaped in Git Bash on Windows

See original GitHub issue

System info:

  • Windows 10
  • VS Code version: 1.47.1
  • Extension version: 2020.6.91350
  • Git Bash

Steps:

  • Create a virtual environment, don’t install anything and set it as your interpreter path
  • Enable linting in the repo, and install pylint when prompted

image

Text on the screenshot:

Kim@DESKTOP-BINGO MINGW64 ~/Documents/Work/vscode-python/pythonFiles (main)
$ source c:/Users/Kim/Documents/Work/vscode-python/.venv/Scripts/activate
(.venv) 
Kim@DESKTOP-BINGO MINGW64 ~/Documents/Work/vscode-python/pythonFiles (main)
$ c:/Users/Kim/Documents/Work/vscode-python/.venv/Scripts/python.exe c:\Users\K
im\.vscode\extensions\ms-python.python-2020.6.91350\pythonFiles\pyvsc-run-isola
ted.py pip install -U pylint
C:\Python38\python.exe: can't open file 'c:UsersKim.vscodeextensionsms-python.python-2020.6.91350pythonFilespyvsc-run-isolated.py': [Errno 2] No such file or directory
(.venv) 
Kim@DESKTOP-BINGO MINGW64 ~/Documents/Work/vscode-python/pythonFiles (main)
$ 

Related: #734 #700 and mayyyybe #11419

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:11
  • Comments:5

github_iconTop GitHub Comments

3reactions
testworksaucommented, Nov 10, 2020

In order to get this working, in Terminal -> terminal dropdown -> Select Default Shell, choose anything except Git Bash or WSL Bash.

Interestingly, the escaping in WSL bash looks better but doesn’t take the /mnt/ path into account.

image

2reactions
bengartnercommented, Aug 29, 2020

Same issue on:

  • Windows 10
  • VS Code 1.48.1
  • Extension: ms-python.python-2020.8.105045
  • Git bash: git version 2.27.0.windows.1
Read more comments on GitHub >

github_iconTop Results From Across the Web

Git Bash for Windows showing/expecting file paths with ...
When I installed Git for Windows by itself previously, it showed the slashes/colon properly, but was much more limiting and harder to use...
Read more >
Escaping asterisk * in Bash on Windows - Super User
Try it like this idea based on escaping tips and ideas found on this site: curl -X PUT https://example.com/_config/cors/origins -d "\*".
Read more >
Runner on Windows using bash as the shell passes paths ...
Configure a GitLab-runner on windows to use bash as the shell. ... other way around due to escaping sequences that eat single backslashes, ......
Read more >
Git for Windows drops slashes in path - Reddit
Unfortunately, it is dropping slashes in the path, so it says it cannot find the actual path. The error message is: Could not...
Read more >
Getting Started with Git for the Windows Developer (Part II)
Instead of using the forward-slash (\) character as a path delimiter, Bash (and Linux) uses the backslash (/); /c/ is the Linux way...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found