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

New REPL does not respect the working directory on Apple Silicon #23687

Closed
juanfcocontreras opened this issue Jun 25, 2024 · 2 comments
Closed
Assignees
Labels
triage-needed Needs assignment to the proper sub-team

Comments

@juanfcocontreras
Copy link

Type: Bug

Behaviour

When loading a file with the new REPL (sendToNativeREPL) it takes as working directory the root of the hard disk, instead of the workspace.

Steps to reproduce:

  1. Run the following code:
import pandas as pd

df = pd.read_csv("./extracted_features.csv")
  1. The output:
FileNotFoundError: [Errno 2] No such file or directory: './extracted_features.csv'
  1. If I run:
print(os.getcwd())

I get:

/

Diagnostic data

Output for Python in the Output panel (ViewOutput, change the drop-down the upper-right of the Output panel to Python)

2024-06-25 13:13:56.350 [error] Invalid version for /opt/homebrew/Caskroom/miniforge/base/bin/python: {"name":"base","location":"/opt/homebrew/Caskroom/miniforge/base","kind":"virt-conda","executable":{"filename":"/opt/homebrew/Caskroom/miniforge/base/bin/python","sysPrefix":"/opt/homebrew/Caskroom/miniforge/base","ctime":1710964557889,"mtime":1710964557889},"display":"Python 3.1.x ('base')","version":{"major":3,"minor":1,"micro":-1},"arch":1,"distro":{"org":"Anaconda, Inc."},"source":[],"type":"Conda","id":"/opt/homebrew/Caskroom/miniforge/base/bin/python","detailedDisplayName":"Python 3.1.x ('base': conda)"}
2024-06-25 13:13:56.351 [error] Invalid version for /opt/homebrew/Caskroom/miniforge/base/bin/python: {"name":"base","location":"/opt/homebrew/Caskroom/miniforge/base","kind":"virt-conda","executable":{"filename":"/opt/homebrew/Caskroom/miniforge/base/bin/python","sysPrefix":"/opt/homebrew/Caskroom/miniforge/base","ctime":1710964557889,"mtime":1710964557889},"display":"Python 3.1.x ('base')","version":{"major":3,"minor":1,"micro":-1},"arch":1,"distro":{"org":"Anaconda, Inc."},"source":[],"type":"Conda","id":"/opt/homebrew/Caskroom/miniforge/base/bin/python","detailedDisplayName":"Python 3.1.x ('base': conda)"}
2024-06-25 13:14:30.879 [info] Telemetry level is off
2024-06-25 13:14:30.879 [info] Experiments are disabled, only manually opted experiments are active.
2024-06-25 13:14:30.879 [info] Experiment 'All' is active
2024-06-25 13:14:30.879 [info] Default formatter is set to null for workspace /Users/user/Desktop/prueba
2024-06-25 13:14:30.882 [info] > /opt/homebrew/Caskroom/miniforge/base/bin/python info --json
2024-06-25 13:14:31.006 [info] > conda info --json
2024-06-25 13:14:31.007 [info] > pyenv which python
2024-06-25 13:14:31.007 [info] cwd: .
2024-06-25 13:14:31.565 [info] > /opt/homebrew/Caskroom/miniforge/base/bin/python -I ~/.vscode/extensions/ms-python.python-2024.8.1/python_files/get_output_via_markers.py ~/.vscode/extensions/ms-python.python-2024.8.1/python_files/interpreterInfo.py
2024-06-25 13:14:31.641 [info] Python interpreter path: /opt/homebrew/Caskroom/miniforge/base/bin/python
2024-06-25 13:14:31.647 [info] > /opt/homebrew/Caskroom/miniforge/base/bin/python info --json
2024-06-25 13:14:31.647 [info] shell: zsh
2024-06-25 13:14:31.720 [info] > conda info --json
2024-06-25 13:14:31.720 [info] shell: zsh
2024-06-25 13:14:32.159 [info] > conda run -n base --no-capture-output python ~/.vscode/extensions/ms-python.python-2024.8.1/python_files/get_output_via_markers.py ~/.vscode/extensions/ms-python.python-2024.8.1/python_files/printEnvVariables.py
2024-06-25 13:14:32.159 [info] shell: zsh
2024-06-25 13:14:32.426 [info] Starting Pylance language server.
2024-06-25 13:14:32.851 [info] > /usr/bin/python3 ~/.vscode/extensions/ms-python.python-2024.8.1/python_files/printEnvVariables.py
2024-06-25 13:14:32.851 [info] shell: zsh
2024-06-25 13:14:32.885 [info] Setting environment variable _CONDA_SET_MAGPLUS_HOME in collection to  {"applyAtShellIntegration":true,"applyAtProcessCreation":true}
2024-06-25 13:14:32.885 [info] Setting environment variable MANPATH in collection to /opt/homebrew/share/man:: {"applyAtShellIntegration":true,"applyAtProcessCreation":true}
2024-06-25 13:14:32.885 [info] Setting environment variable GSETTINGS_SCHEMA_DIR_CONDA_BACKUP in collection to  {"applyAtShellIntegration":true,"applyAtProcessCreation":true}
2024-06-25 13:14:32.885 [info] Setting environment variable _CE_CONDA in collection to  {"applyAtShellIntegration":true,"applyAtProcessCreation":true}
2024-06-25 13:14:32.885 [info] Setting environment variable CONDA_ROOT in collection to /opt/homebrew/Caskroom/miniforge/base {"applyAtShellIntegration":true,"applyAtProcessCreation":true}
2024-06-25 13:14:32.885 [info] Setting environment variable _CE_M in collection to  {"applyAtShellIntegration":true,"applyAtProcessCreation":true}
2024-06-25 13:14:32.885 [info] Setting environment variable XPC_SERVICE_NAME in collection to 0 {"applyAtShellIntegration":true,"applyAtProcessCreation":true}
2024-06-25 13:14:32.885 [info] Setting environment variable CONDA_ALLOW_SOFTLINKS in collection to false {"applyAtShellIntegration":true,"applyAtProcessCreation":true}
2024-06-25 13:14:32.885 [info] Send text to terminal: /usr/bin/python3 /Users/user/.vscode/extensions/ms-python.python-2024.8.1/python_files/printEnvVariablesToFile.py /Users/user/.vscode/extensions/ms-python.python-2024.8.1/python_files/deactivate/zsh/envVars.txt

Extension version: 2024.8.1
VS Code version: Code 1.90.2 (5437499feb04f7a586f677b155b039bc2b3669eb, 2024-06-18T22:54:35.075Z)
OS version: Darwin arm64 23.5.0
Modes:

  • Python version (& distribution if applicable, e.g. Anaconda): 3.10.14
  • Type of virtual environment used (e.g. conda, venv, virtualenv, etc.): Conda
  • Value of the python.languageServer setting: Pylance
User Settings


condaPath: "<placeholder>"

languageServer: "Pylance"

experiments
• optInto: ["All"]

Installed Extensions
Extension Name Extension Id Version
JavaScript Debugger ms-vscode.js-debug 1.90.0
JavaScript Debugger Companion Extension ms-vscode.js-debug-companion 1.1.2
Pylance ms-python.vscode-pylance 2024.6.1
Python ms-python.python 2024.8.1
Python Debugger ms-python.debugpy 2024.6.0
Table Visualizer for JavaScript Profiles ms-vscode.vscode-js-profile-table 1.0.9
System Info
Item Value
CPUs Apple M2 (8 x 2400)
GPU Status 2d_canvas: enabled
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
Load (avg) 3, 4, 4
Memory (System) 24.00GB (0.07GB free)
Process Argv
Screen Reader no
VM 0%
@github-actions github-actions bot added the triage-needed Needs assignment to the proper sub-team label Jun 25, 2024
@anthonykim1
Copy link

thanks for filing this issue! Looks like its a dup of #23656
Lets track it in #23656

@anthonykim1 anthonykim1 closed this as not planned Won't fix, can't repro, duplicate, stale Jul 9, 2024
@juanfcocontreras
Copy link
Author

thanks for filing this issue! Looks like its a dup of #23656 Lets track it in #23656

Ok. I saw that issue, but I don't have any nested folder, so I created a new one, because I wasn't sure if it was the same problem or not.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 10, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
triage-needed Needs assignment to the proper sub-team
Projects
None yet
Development

No branches or pull requests

2 participants