sourcery-ai / sourcery

Instant AI code reviews
https://sourcery.ai
MIT License
1.54k stars 68 forks source link

Cannot use sourcery if source code folder is in wsl #403

Open tri-cao opened 10 months ago

tri-cao commented 10 months ago

Checklist

Description

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

Reproduce Steps

Debug Information

IDE Version: PyCharm Professional Edition 2023.2.5

Sourcery Version: 1.14.0

Operating system and Version: Windows 10

bm424 commented 10 months ago

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 commented 10 months ago

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 support@sourcery.ai so that we can see what's being sent to the binary from the IDE?

tri-cao commented 10 months ago

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

houtmanj commented 10 months ago

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

theobredemann commented 8 months ago

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

markrmiller commented 1 month ago

Sucks that this still doesn't work. Not long before I have gone through a year of a subscription without ever having hardly used the thing.

Currently, Sourcery will try and use paths like: \Wsl.localhost:\ubuntu\home\project When it needs to be: \\wsl.localhost\ubuntu\home\project