sourcery icon indicating copy to clipboard operation
sourcery copied to clipboard

Cannot use sourcery if source code folder is in wsl

Open tri-cao opened this issue 2 years ago • 7 comments

Checklist

Description

Cannot use sourcery if the source code is in wsl Error: image

Reproduce Steps

  • Create folder inside wsl
  • Open pycharm, open folder inside wsl image
  • Use sourcery

Debug Information

IDE Version: PyCharm Professional Edition 2023.2.5

Sourcery Version: 1.14.0

Operating system and Version: Windows 10

tri-cao avatar Nov 23 '23 16:11 tri-cao

Hi @tri-cao, thanks for bringing this to our attention - it looks like a bug in the way we handle windows paths. I'll have a look at this and let you know when we have a fix.

bm424 avatar Nov 23 '23 17:11 bm424

Hi @tri-cao, I've been taking a look at this today. It's difficult to see exactly what the problem is on my machine, because there's clearly some conversion happening between the file path representation in WSL, Windows, PyCharm, and Sourcery. If possible, could you send your sourcery log file (docs) to [email protected] so that we can see what's being sent to the binary from the IDE?

bm424 avatar Nov 24 '23 10:11 bm424

here you go sourcery.log

I think this should be the correct path: file:\\wsl$\Ubuntu\home\nix\project\pycode\main.py I can access the file with windows explorer using that path

tri-cao avatar Nov 24 '23 11:11 tri-cao

I've ran into this issue while giving the free trial a run. As suggested I have sent the logs to support.

houtmanj avatar Dec 06 '23 04:12 houtmanj

Same issue here. Running WSL2 under Win10

"[Errno 2] No such file or directory: '\wsl$\Ubuntu\home\theo\Documents [...]"

IDE Version: PyCharm 2023.3.3 (Professional Edition) Build #PY-233.13763.11, built on January 25, 2024 Sourcery Version: 1.15.0 Operating system and Version: Windows 10 Home Single Language

theobredemann avatar Jan 31 '24 16:01 theobredemann