-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
REPL doesn’t work when the python file is in nested folder #23656
Comments
This is weird - does |
I can confirm i have the same issue, and setting |
I am facing the same issue. It spawns in the wrong working directory. |
Hey folks, good news here: working to get this resolved this month :) Will let you all know once I merge in the changes so you can try it all out. Thanks! |
@rebornix As far as settings to straight up let the users set their cwd for REPL, I think that would be feature request. Not too sure about the setting as folks could just
and set their cwd if they want to override the default workspace directory setting. |
Let's track the bug here: #23821 |
Thanks for the feature request! We are going to give the community 60 days from when this issue was created to provide 7 👍 upvotes on the opening comment to gauge general interest in this idea. If there's enough upvotes then we will consider this feature request in our future planning. If there's unfortunately not enough upvotes then we will close this issue. |
Resolves: #23727 Allow users to launch Native REPL via command palette. Will also be handling #23821 in this PR. -- setting proper workspace directory. Related: #23656 Covering scenarios: - Provide selection option if user is in multi-workspace scenario (already included in PR) - Automatically pick workspace as directory for context of REPL if user is in single-workspace scenario (already included in PR) - Handle case where user does not open any workspace and attempt to launch native REPL from plain/empty VS Code instance via command palette option (already included in PR)
Hi folks. As promisedm we are NOW setting the directory properly for 3 different scenarios as a result of #23912 (got merged about two days ago), so please give this a try after updating to the latest pre-release version of Python extension. 3 different scenario should cover:
should yield expected workspace directory, following same trend as terminal. As far as OPTION to more explicitly choose directory for REPL launch (if you think the result of PR is not enough), please give this issue an upvote so we can see the interest. FYI
will also allow you to easily navigate through whichever subdirectory or directory of your chose if you want. |
Type: Bug
My python file is in a sub folder
nested/test.py
and there is a csv file next to itnested/data.csv
, however if I try to load the file with relative path"data.csv"
, it only works if I use"nested/data.csv"
.I was expecting the relative path to just work. However if this is as designed, I would love to have a setting to set the
cwd
to the parent folder of the python file when using it in REPL.Extension version: 2024.9.11731014
VS Code version: Code - Insiders 1.91.0-insider (Universal) (63d06667600a2c40245a0ab1f9e2ea816d2fe849, 2024-06-21T10:24:54.816Z)
OS version: Darwin arm64 23.5.0
Modes:
python.languageServer
setting: DefaultUser Settings
Installed Extensions
System Info
canvas_oop_rasterization: enabled_on
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_graphite: disabled_off
video_decode: enabled
video_encode: enabled
webgl: enabled
webgl2: enabled
webgpu: enabled
A/B Experiments
The text was updated successfully, but these errors were encountered: