You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Consider not logging warnings when not applicable (for pixi envs) #23901
I think warning messages are being logged as follows, however this is causing some confusion amongst users.
Suggestion is to turn this into trace or debug, else it could lead to false alarms.
2024-08-01 22:35:26.028 [warning] could not find a pixi interpreter for the interpreter at /Users/pi/code/2024/spins/.venv/bin/python
:
Like most other users in the issue threads, I also don't know what pixi is and if I should make the effort to install it.
The warning message doesn't help because it doesn't give any info on what pixi is and what a user is required to do. Agree that it's better as a debug message, but in any case, adding some pointers to help the user remedy the issue would help.
In my case, IntelliSense suggestions stop working midway through my session(I reload the window and it's back to normal, before entering the same loop) and I see this warning followed by an ENOENT error in the output stream.
Reacted by Troy Tamas, MikaelH, mishutindima, Corey Sobel, Anonym271, Garth Kidd, Cal Jacobson and Nekkowe!
I started having issue with running pytest with conda environment recently (last 2 weeks), and I see a similar message, and not sure if it is related.
My conda environment selected is called "testtest", so it's supposed to use that conda environment python env, which includes all the dependencies necessary to run the test. I can run pytest fine from a terminal, but when I open the test tab in vscode, I get:
2024-09-20 10:17:33.815 [info] > pixi --version
2024-09-20 10:17:33.816 [warning] could not find a pixi interpreter for the interpreter at /opt/homebrew/Caskroom/miniconda/base/envs/testtest/bin/python
2024-09-20 10:17:33.830 [info] > python -m pytest -p vscode_pytest --collect-only
2024-09-20 10:17:33.840 [info] cwd: .
2024-09-20 10:17:33.854 [error] /opt/homebrew/Caskroom/miniconda/base/bin/python: No module named pytest
It seems that python extension is switching to using the base python module (instead of conda testtest env that was attempted first), just after the pixi error.
I also tried to install pixi and ran pixi --version, but pixi didn't have that command. I am not even sure if that's the pixi (pypi pixi) it's looking for.
I know I can install pytest in the base python env to fix this error, but then there are other dependencies that are missing as well, and defeats the purpose of using a conda environment with vscode.
Currently, can't run unit tests, and I can't find any help about this online.
Thanks
UPDATE: It turned out related to experiment pythonTestAdapter, which is broken with conda, as it tries to look for bin/python/bin/python instead of bin/python location.
Michel El Nacouzi (@sfc-gh-melnacouzi) I am facing the exact same problem. Miniconda + python 3.11.9 on macos.
Here is what fixed my issue. In vscode settings I added :
Michel El Nacouzi (@sfc-gh-melnacouzi) I am facing the exact same problem. Miniconda + python 3.11.9 on macos. Here is what fixed my issue. In vscode settings I added :
This is really irritating.
I'm glad I at least found this issue to explain that it wasn't anything wrong with my setup or project - it's just this plugin going "Hey, this thing you didn't install, never heard of, and have no intention of using? It looks like you don't have it set up." at [warning] level.
Hi Nekkowe! (@Nekkowe)! Are you able to try on the most recent release and make sure your VS Code is also up to date? We moved it out of warning level recently so it shouldn't appear. Secondly this isn't explicitly related to "python.experiments.optOutFrom": ["pythonTestAdapter"] but the two could be correlated.
Thank you for letting me know - on the latest release, the warning appears to changed to [warning] Dir <project path>/.pixi/envs" is not watchable (directory does not exist)
2024-10-04 10:42:02.993 [info] Telemetry level is off
2024-10-04 10:42:02.993 [info] Experiments are disabled, only manually opted experiments are active.
2024-10-04 10:42:02.993 [info] Experiment 'pythonTestAdapter' is inactive
2024-10-04 10:42:02.993 [warning] Dir "<path to my project>/.pixi/envs" is not watchable (directory does not exist)
2024-10-04 10:42:02.993 [info] Default formatter is set to null for workspace <path to my project>
2024-10-04 10:42:02.993 [info] > conda info --json
2024-10-04 10:42:02.993 [info] Python interpreter path: /bin/python3
2024-10-04 10:42:03.045 [info] > pyenv which python
2024-10-04 10:42:03.045 [info] cwd: .
2024-10-04 10:42:03.893 [info] Starting Jedi language server for <project>.
Yes, related: #23942
There has been couple PRs to log level down pixi as much as possible if deemed unnecessary for folks who do not even intend to use pixi at all.
traceWarn(`Dir "${root}" is not watchable (${unwatchable})`);
is the one message that I was very hesitant of leveling down further down.
I wasn't trying to use pixi environment, nope - I'd never installed, heard of, or had any intention of using pixi. So you can imagine my confusion seeing this warning! 😄
I don't see any reference to pixi in the logs, is there any special environment type I need to set up to verify this or is that good enough? Karthik Nadig (@karthiknadig)
Activity
karthiknadig commentedon Aug 2, 2024
Similar issue microsoft/vscode#223515
tinvaan commentedon Aug 10, 2024
Like most other users in the issue threads, I also don't know what
pixiis and if I should make the effort to install it.The warning message doesn't help because it doesn't give any info on what
pixiis and what a user is required to do. Agree that it's better as a debug message, but in any case, adding some pointers to help the user remedy the issue would help.In my case, IntelliSense suggestions stop working midway through my session(I reload the window and it's back to normal, before entering the same loop) and I see this warning followed by an
ENOENTerror in the output stream.sfc-gh-melnacouzi commentedon Sep 20, 2024
I started having issue with running pytest with conda environment recently (last 2 weeks), and I see a similar message, and not sure if it is related.
My conda environment selected is called "testtest", so it's supposed to use that conda environment python env, which includes all the dependencies necessary to run the test. I can run pytest fine from a terminal, but when I open the test tab in vscode, I get:
Please note the 2 python paths attempted above:
/opt/homebrew/Caskroom/miniconda/base/envs/testtest/bin/python/opt/homebrew/Caskroom/miniconda/base/bin/pythonIt seems that python extension is switching to using the base python module (instead of conda testtest env that was attempted first), just after the pixi error.
I also tried to install pixi and ran pixi --version, but pixi didn't have that command. I am not even sure if that's the pixi (pypi pixi) it's looking for.
I know I can install pytest in the base python env to fix this error, but then there are other dependencies that are missing as well, and defeats the purpose of using a conda environment with vscode.
Currently, can't run unit tests, and I can't find any help about this online.
Thanks
UPDATE: It turned out related to experiment pythonTestAdapter, which is broken with conda, as it tries to look for bin/python/bin/python instead of bin/python location.
7sStudio commentedon Sep 27, 2024
Michel El Nacouzi (@sfc-gh-melnacouzi) I am facing the exact same problem. Miniconda + python 3.11.9 on macos.
Here is what fixed my issue. In vscode settings I added :
mangomatrix commentedon Sep 30, 2024
This worked for me.
Nekkowe commentedon Oct 2, 2024
Didn't change a thing for me, oddly enough.
This is really irritating.
I'm glad I at least found this issue to explain that it wasn't anything wrong with my setup or project - it's just this plugin going "Hey, this thing you didn't install, never heard of, and have no intention of using? It looks like you don't have it set up." at
[warning]level.eleanorjboyd commentedon Oct 3, 2024
Hi Nekkowe! (@Nekkowe)! Are you able to try on the most recent release and make sure your VS Code is also up to date? We moved it out of warning level recently so it shouldn't appear. Secondly this isn't explicitly related to
"python.experiments.optOutFrom": ["pythonTestAdapter"]but the two could be correlated.Nekkowe commentedon Oct 4, 2024
Hi Eleanor Boyd (@eleanorjboyd)!
Thank you for letting me know - on the latest release, the warning appears to changed to
[warning] Dir <project path>/.pixi/envs" is not watchable (directory does not exist)eleanorjboyd commentedon Oct 4, 2024
Anthony Kim (@anthonykim1) - might have more context on this
anthonykim1 commentedon Oct 4, 2024
Yes, related: #23942
There has been couple PRs to log level down pixi as much as possible if deemed unnecessary for folks who do not even intend to use pixi at all.
is the one message that I was very hesitant of leveling down further down.
Nekkowe! (@Nekkowe) Are you trying to use pixi environment? Otherwise you could safely ignore that warning. We could look at leveling this down further just like https://github.com/microsoft/vscode-python/pull/24164/files.
Nekkowe commentedon Oct 12, 2024
I wasn't trying to use pixi environment, nope - I'd never installed, heard of, or had any intention of using pixi. So you can imagine my confusion seeing this warning! 😄
amunger commentedon Oct 24, 2024
I don't see any reference to pixi in the logs, is there any special environment type I need to set up to verify this or is that good enough? Karthik Nadig (@karthiknadig)
karthiknadig commentedon Oct 24, 2024
That is it. You should see something only if there is
pixiinstalled.