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

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

Open
3 tasks done
tri-cao opened this issue Nov 23, 2023 · 6 comments
Open
3 tasks done

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

tri-cao opened this issue Nov 23, 2023 · 6 comments
Assignees
Labels
bug Something isn't working

Comments

@tri-cao
Copy link

tri-cao commented Nov 23, 2023

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 tri-cao added the bug Something isn't working label Nov 23, 2023
@bm424
Copy link
Contributor

bm424 commented Nov 23, 2023

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 bm424 self-assigned this Nov 23, 2023
@bm424
Copy link
Contributor

bm424 commented Nov 24, 2023

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
Copy link
Author

tri-cao commented Nov 24, 2023

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
Copy link

houtmanj commented Dec 6, 2023

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

@theobredemann
Copy link

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
Copy link

markrmiller commented Aug 28, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants